diff --git a/test/aeso_compiler_tests.erl b/test/aeso_compiler_tests.erl index 4d2779a..f0b73bd 100644 --- a/test/aeso_compiler_tests.erl +++ b/test/aeso_compiler_tests.erl @@ -356,7 +356,13 @@ failing_contracts() -> <<"Use 'entrypoint' for declaration of foo (at line 6, column 3):\n entrypoint foo : () => unit">>, <<"Use 'entrypoint' instead of 'function' for public function foo (at line 10, column 3):\n entrypoint foo() = ()">>, <<"Use 'entrypoint' instead of 'function' for public function foo (at line 6, column 3):\n entrypoint foo : () => unit">>]} - , {"list_comp_fail", + , {"list_comp_not_a_list", [<<"Cannot unify int\n and list('a)\nwhen checking rvalue of list comprehension binding at line 2, column 36\n 1 : int\nagainst type \n list('a)">> ]} + , {"list_comp_if_not_bool", + [<<"Cannot unify int\n and bool\nwhen checking the type of the expression at line 2, column 44\n 3 : int\nagainst the expected type\n bool">> + ]} + , {"list_comp_bad_shadow", + [<<"Cannot unify int\n and string\nwhen checking the type of the pattern at line 2, column 53\n x : int\nagainst the expected type\n string">> + ]} ]. diff --git a/test/contracts/list_comp_bad_shadow.aes b/test/contracts/list_comp_bad_shadow.aes new file mode 100644 index 0000000..b54735c --- /dev/null +++ b/test/contracts/list_comp_bad_shadow.aes @@ -0,0 +1,2 @@ +contract BadComp = + entrypoint failing() = [x + 1 | x <- [1,2,3], let x = "XD"] diff --git a/test/contracts/list_comp_if_not_bool.aes b/test/contracts/list_comp_if_not_bool.aes new file mode 100644 index 0000000..cd3c458 --- /dev/null +++ b/test/contracts/list_comp_if_not_bool.aes @@ -0,0 +1,2 @@ +contract BadComp = + entrypoint failing() = [x | x <- [], if (3)] diff --git a/test/contracts/list_comp_fail.aes b/test/contracts/list_comp_not_a_list.aes similarity index 100% rename from test/contracts/list_comp_fail.aes rename to test/contracts/list_comp_not_a_list.aes