diff --git a/src/aeso_ast_infer_types.erl b/src/aeso_ast_infer_types.erl index eb6090f..f3c44de 100644 --- a/src/aeso_ast_infer_types.erl +++ b/src/aeso_ast_infer_types.erl @@ -1864,7 +1864,7 @@ pp_error({event_0_to_3_indexed_values, Constr}) -> io_lib:format("The event constructor ~s (at ~s) has too many indexed values (max 3)\n", [name(Constr), pp_loc(Constr)]); pp_error({event_0_to_1_string_values, Constr}) -> - io_lib:format("The event constructor ~s (at ~s) has too many string values (max 1)\n", + io_lib:format("The event constructor ~s (at ~s) has too many non-indexed values (max 1)\n", [name(Constr), pp_loc(Constr)]); pp_error({repeated_constructor, Cs}) -> io_lib:format("Variant types must have distinct constructor names\n~s", diff --git a/test/aeso_compiler_tests.erl b/test/aeso_compiler_tests.erl index 04fa19f..f96feb7 100644 --- a/test/aeso_compiler_tests.erl +++ b/test/aeso_compiler_tests.erl @@ -202,8 +202,11 @@ failing_contracts() -> <<"The indexed type string (at line 9, column 25) is not a word type">>, <<"The indexed type alias_string (at line 11, column 25) equals string which is not a word type">>]} , {"bad_events2", - [<<"The event constructor BadEvent1 (at line 9, column 7) has too many string values (max 1)">>, - <<"The event constructor BadEvent2 (at line 10, column 7) has too many indexed values (max 3)">>]} + [<<"The event constructor BadEvent1 (at line 9, column 7) has too many non-indexed values (max 1)">>, + <<"The event constructor BadEvent2 (at line 10, column 7) has too many indexed values (max 3)">>, + <<"The event constructor BadEvent3 (at line 11, column 7) has too many non-indexed values (max 1)">>, + <<"The payload type address (at line 11, column 17) should be string">>, + <<"The payload type int (at line 11, column 26) should be string">>]} , {"type_clash", [<<"Cannot unify int\n" " and string\n" diff --git a/test/contracts/bad_events2.aes b/test/contracts/bad_events2.aes index 02842e3..42843f3 100644 --- a/test/contracts/bad_events2.aes +++ b/test/contracts/bad_events2.aes @@ -8,6 +8,7 @@ contract Events = | Event2(alias_string, indexed alias_address) | BadEvent1(string, string) | BadEvent2(indexed int, indexed int, indexed int, indexed address) + | BadEvent3(address, int) function f1(x : int, y : string) = Chain.event(Event1(x, x+1, y))