From 672ffd6ce1c7792cbd5efc4afca711f7619fbb01 Mon Sep 17 00:00:00 2001 From: radrow Date: Tue, 16 Jul 2019 16:25:19 +0200 Subject: [PATCH] Added fail test --- test/aeso_compiler_tests.erl | 3 +++ test/contracts/list_comp_fail.aes | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 test/contracts/list_comp_fail.aes diff --git a/test/aeso_compiler_tests.erl b/test/aeso_compiler_tests.erl index 7a8d2e0..4d2779a 100644 --- a/test/aeso_compiler_tests.erl +++ b/test/aeso_compiler_tests.erl @@ -356,4 +356,7 @@ 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", + [<<"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)">> + ]} ]. diff --git a/test/contracts/list_comp_fail.aes b/test/contracts/list_comp_fail.aes new file mode 100644 index 0000000..41321cb --- /dev/null +++ b/test/contracts/list_comp_fail.aes @@ -0,0 +1,2 @@ +contract ListCompBad = + entrypoint failing() = [x | x <- 1]