Polymorphism support #848

Merged
ghallak merged 53 commits from ghallak/307 into master 2022-06-17 18:09:07 +09:00
2 changed files with 15 additions and 0 deletions
Showing only changes of commit adb3455f25 - Show all commits

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'