Add tests for interfaces implementing interfaces
This commit is contained in:
parent
adb3455f25
commit
88666a36d2
@ -836,6 +836,16 @@ failing_contracts() ->
|
|||||||
[<<?Pos(7,10)
|
[<<?Pos(7,10)
|
||||||
"Unimplemented function f from the interface I in the contract C">>
|
"Unimplemented function f from the interface I in the contract C">>
|
||||||
])
|
])
|
||||||
|
, ?TYPE_ERROR(contract_interface_polymorphism_same_name_same_type,
|
||||||
|
[<<?Pos(7,10)
|
||||||
|
"Unimplemented function f from the interface I1 in the contract C">>
|
||||||
|
])
|
||||||
|
, ?TYPE_ERROR(contract_interface_polymorphism_same_name_different_type,
|
||||||
|
[<<?Pos(9,5)
|
||||||
|
"Duplicate definitions of f at\n"
|
||||||
|
" - line 8, column 5\n"
|
||||||
|
" - line 9, column 5">>
|
||||||
|
])
|
||||||
, ?TYPE_ERROR(contract_polymorphism_missing_implementation,
|
, ?TYPE_ERROR(contract_polymorphism_missing_implementation,
|
||||||
[<<?Pos(7,10)
|
[<<?Pos(7,10)
|
||||||
"Unimplemented function f from the interface I1 in the contract C">>
|
"Unimplemented function f from the interface I1 in the contract C">>
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
contract interface I1 =
|
||||||
|
entrypoint f : () => int
|
||||||
|
|
||||||
|
contract interface I2 : I1 =
|
||||||
|
entrypoint f : () => char
|
||||||
|
|
||||||
|
contract C : I2 =
|
||||||
|
entrypoint f() = 1
|
||||||
|
entrypoint f() = 'c'
|
@ -0,0 +1,8 @@
|
|||||||
|
contract interface I1 =
|
||||||
|
entrypoint f : () => int
|
||||||
|
|
||||||
|
contract interface I2 : I1 =
|
||||||
|
entrypoint f : () => int
|
||||||
|
|
||||||
|
contract C : I2 =
|
||||||
|
entrypoint f() = 1
|
Loading…
x
Reference in New Issue
Block a user