diff --git a/src/aeso_ast_infer_types.erl b/src/aeso_ast_infer_types.erl index 26d8054..6ea8dd2 100644 --- a/src/aeso_ast_infer_types.erl +++ b/src/aeso_ast_infer_types.erl @@ -3381,10 +3381,10 @@ mk_error({empty_record_definition, Ann, Name}) -> Msg = io_lib:format("Empty record definitions are not allowed. Cannot define the record `~s`", [Name]), mk_t_err(pos(Ann), Msg); mk_error({unimplemented_interface_function, ConId, InterfaceName, FunName}) -> - Msg = io_lib:format("Unimplemented function ~s from the interface ~s in the contract ~s", [FunName, InterfaceName, pp(ConId)]), + Msg = io_lib:format("Unimplemented function `~s` from the interface `~s` in the contract `~s`", [FunName, InterfaceName, pp(ConId)]), mk_t_err(pos(ConId), Msg); mk_error({referencing_undefined_interface, InterfaceId}) -> - Msg = io_lib:format("Trying to implement or extend an undefined interface ~s", [pp(InterfaceId)]), + Msg = io_lib:format("Trying to implement or extend an undefined interface `~s`", [pp(InterfaceId)]), mk_t_err(pos(InterfaceId), Msg); mk_error(Err) -> Msg = io_lib:format("Unknown error: ~p", [Err]), diff --git a/test/aeso_compiler_tests.erl b/test/aeso_compiler_tests.erl index 8a133a2..e131e95 100644 --- a/test/aeso_compiler_tests.erl +++ b/test/aeso_compiler_tests.erl @@ -565,7 +565,7 @@ failing_contracts() -> ]) , ?TYPE_ERROR(list_comp_bad_shadow, [<> ]) , ?TYPE_ERROR(map_as_map_key, @@ -830,57 +830,60 @@ failing_contracts() -> ]) , ?TYPE_ERROR(contract_interface_polymorphism_recursive, [<> + "Trying to implement or extend an undefined interface `Z`">> ]) , ?TYPE_ERROR(contract_interface_polymorphism_same_decl_multi_interface, [<> + "Unimplemented function `f` from the interface `I` in the contract `C`">> ]) , ?TYPE_ERROR(contract_interface_polymorphism_same_name_same_type, [<> + "Unimplemented function `f` from the interface `I1` in the contract `C`">> ]) , ?TYPE_ERROR(contract_interface_polymorphism_same_name_different_type, [<> ]) , ?TYPE_ERROR(contract_polymorphism_missing_implementation, [<> + "Unimplemented function `f` from the interface `I1` in the contract `C`">> ]) , ?TYPE_ERROR(contract_polymorphism_same_decl_multi_interface, [<> + "Unimplemented function `f` from the interface `J` in the contract `C`">> ]) , ?TYPE_ERROR(contract_polymorphism_undefined_interface, [<> + "Trying to implement or extend an undefined interface `I`">> ]) , ?TYPE_ERROR(contract_polymorphism_same_name_different_type_multi_interface, [<> ]) , ?TYPE_ERROR(contract_interface_polymorphism_undefined_interface, [<> + "Trying to implement or extend an undefined interface `H`">> ]) , ?TYPE_ERROR(polymorphism_variance_switching, [< Cat\nto arguments\n x : Animal">>, + "Cannot unify `Animal` and `Cat`\n" + "when checking the application of\n" + " `g2 : (Cat) => Cat`\n" + "to arguments\n" + " `x : Animal`">>, <>, + "Cannot unify `Animal` and `Cat`\n" + "when checking the type of the expression `g3(x) : Animal` against the expected type `Cat`">>, < Animal) => Cat\nto arguments\n x : (Cat) => Cat">> + "Cannot unify `Animal` and `Cat`\n" + "when checking the application of\n" + " `g5 : ((Animal) => Animal) => Cat`\n" + "to arguments\n" + " `x : (Cat) => Cat`">> ]) ].