Ban empty contracts, ban function blocks with mismatched declarations

This commit is contained in:
radrow
2020-05-15 19:09:08 +02:00
parent 962ddf5303
commit 54e43764ca
5 changed files with 37 additions and 8 deletions
+10
View File
@@ -665,6 +665,16 @@ failing_contracts() ->
"Empty record/map update\n"
" r {}">>
])
, ?TYPE_ERROR(bad_function_block,
[<<?Pos(4, 5)
"Mismatch in the function block. Expected implementation/type declaration of g function">>,
<<?Pos(5, 5)
"Mismatch in the function block. Expected implementation/type declaration of g function">>
])
, ?TYPE_ERROR(just_an_empty_file,
[<<?Pos(0, 0)
"Empty contract">>
])
, ?TYPE_ERROR(bad_number_of_args,
[<<?Pos(3, 39)
"Cannot unify () => unit\n"
+5
View File
@@ -0,0 +1,5 @@
contract C =
function
g(1) = 2
f(2) = 3
h(1) = 123