Ban empty record definitions (#384)

* Ban empty record declarations

* Use definition instead of declaration

* Fix the failing test
This commit is contained in:
Gaith Hallak
2022-05-25 17:59:46 +04:00
committed by GitHub
parent a894876f56
commit b0e6418161
4 changed files with 14 additions and 0 deletions
+4
View File
@@ -791,6 +791,10 @@ failing_contracts() ->
"when checking the type of the expression `\"y\" : string` "
"against the expected type `bool`">>
])
, ?TYPE_ERROR(empty_record_definition,
[<<?Pos(2,5)
"Empty record definitions are not allowed. Cannot define the record `r`">>
])
, ?TYPE_ERROR(warnings,
[<<?Pos(0, 0)
"The file `Triple.aes` is included but not used.">>,
@@ -0,0 +1,3 @@
contract C =
record r = {}
entrypoint init() = ()