diff --git a/test/aeso_compiler_tests.erl b/test/aeso_compiler_tests.erl index 192da86..7e8f2f0 100644 --- a/test/aeso_compiler_tests.erl +++ b/test/aeso_compiler_tests.erl @@ -836,6 +836,16 @@ failing_contracts() -> [<> ]) + , ?TYPE_ERROR(contract_interface_polymorphism_same_name_same_type, + [<> + ]) + , ?TYPE_ERROR(contract_interface_polymorphism_same_name_different_type, + [<> + ]) , ?TYPE_ERROR(contract_polymorphism_missing_implementation, [<> diff --git a/test/contracts/contract_interface_polymorphism_same_name_different_type.aes b/test/contracts/contract_interface_polymorphism_same_name_different_type.aes new file mode 100644 index 0000000..d324c11 --- /dev/null +++ b/test/contracts/contract_interface_polymorphism_same_name_different_type.aes @@ -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' diff --git a/test/contracts/contract_interface_polymorphism_same_name_same_type.aes b/test/contracts/contract_interface_polymorphism_same_name_same_type.aes new file mode 100644 index 0000000..20ab99f --- /dev/null +++ b/test/contracts/contract_interface_polymorphism_same_name_same_type.aes @@ -0,0 +1,8 @@ +contract interface I1 = + entrypoint f : () => int + +contract interface I2 : I1 = + entrypoint f : () => int + +contract C : I2 = + entrypoint f() = 1