Nicer error for missing event type
This commit is contained in:
@@ -496,6 +496,10 @@ failing_contracts() ->
|
||||
"and cannot be called from the contract code.">>])
|
||||
, ?TEST(bad_top_level_decl,
|
||||
[<<?Pos(1, 1) "The definition of 'square' must appear inside a contract or namespace.">>])
|
||||
, ?TEST(missing_event_type,
|
||||
[<<?Pos(3, 5)
|
||||
"Unbound variable Chain.event at line 3, column 5\n"
|
||||
"Did you forget to define the event type?">>])
|
||||
].
|
||||
|
||||
-define(Path(File), "code_errors/" ??File).
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
contract MissingEventType =
|
||||
entrypoint main() =
|
||||
Chain.event("MAIN")
|
||||
Reference in New Issue
Block a user