Add test for implementing two interfaces with entrypoints of same names and different types

This commit is contained in:
Gaith Hallak 2021-12-18 19:10:45 +02:00
parent 918ff94a37
commit adb3455f25
2 changed files with 15 additions and 0 deletions

View File

@ -848,6 +848,12 @@ failing_contracts() ->
[<<?Pos(1,14)
"Trying to implement or extend an undefined interface I at line 1, column 14">>
])
, ?TYPE_ERROR(contract_polymorphism_same_name_different_type_multi_interface,
[<<?Pos(9,5)
"Duplicate definitions of f at\n"
" - line 8, column 5\n"
" - line 9, column 5">>
])
, ?TYPE_ERROR(contract_interface_polymorphism_undefined_interface,
[<<?Pos(1,24)
"Trying to implement or extend an undefined interface H at line 1, column 24">>

View File

@ -0,0 +1,9 @@
contract interface I =
entrypoint f : () => int
contract interface J =
entrypoint f : () => char
contract C : I, J =
entrypoint f() = 1
entrypoint f() = 'c'