diff --git a/test/aeso_compiler_tests.erl b/test/aeso_compiler_tests.erl index c45b9ec..ec75032 100644 --- a/test/aeso_compiler_tests.erl +++ b/test/aeso_compiler_tests.erl @@ -623,6 +623,28 @@ failing_contracts() -> "Empty record/map update\n" " r {}">> ]) + , ?TYPE_ERROR(bad_number_of_args, + [< unit\n" + " and (int) => 'a\n", + "when checking the application at line 3, column 39 of\n" + " f : () => unit\n" + "to arguments\n" + " 1 : int">>, + < 'e\n" + " and (int) => 'd\n" + "when checking the application at line 4, column 20 of\n" + " g : (int, string) => 'e\n" + "to arguments\n" + " 1 : int">>, + < 'c\n" + " and (string) => 'b\n" + "when checking the application at line 5, column 20 of\n" + " g : (int, string) => 'c\nto arguments\n" + " \"Litwo, ojczyzno moja\" : string">> + ]) ]. -define(Path(File), "code_errors/" ??File). diff --git a/test/contracts/bad_number_of_args.aes b/test/contracts/bad_number_of_args.aes new file mode 100644 index 0000000..e28f74d --- /dev/null +++ b/test/contracts/bad_number_of_args.aes @@ -0,0 +1,5 @@ +contract Test = + entrypoint f() = () + entrypoint g(x : int, y : string) = f(1) + entrypoint h() = g(1) + entrypoint i() = g("Litwo, ojczyzno moja") \ No newline at end of file