diff --git a/test/aeso_compiler_tests.erl b/test/aeso_compiler_tests.erl index fd1c9a1..13f07d0 100644 --- a/test/aeso_compiler_tests.erl +++ b/test/aeso_compiler_tests.erl @@ -795,6 +795,14 @@ failing_contracts() -> [<> ]) + , ?TYPE_ERROR(operator_lambdas, + [< int` and `(int) => 'a`\n" + "when checking the application of\n" + " `(l : _, r : _) => l + r : (int, int) => int`\n" + "to arguments\n" + " `1 : int`">> + ]) , ?TYPE_ERROR(warnings, [<>, diff --git a/test/contracts/operator_lambdas.aes b/test/contracts/operator_lambdas.aes new file mode 100644 index 0000000..ade8f20 --- /dev/null +++ b/test/contracts/operator_lambdas.aes @@ -0,0 +1,14 @@ +include "List.aes" + +contract C = + type state = int + + function sum(l : list(bool)) : bool = List.foldl((||), false, l) + + entrypoint init() = + let bad_application = (+)(1) + let good_application = (-)(3, 4) + let op_var = (+) + let op_var_application = op_var(3, 4) + + good_application + op_var_application \ No newline at end of file