Nicer error for missing event type

This commit is contained in:
Ulf Norell
2019-09-04 11:03:33 +02:00
parent d8adfce465
commit 97d58fcacd
3 changed files with 22 additions and 10 deletions
+4
View File
@@ -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).
+3
View File
@@ -0,0 +1,3 @@
contract MissingEventType =
entrypoint main() =
Chain.event("MAIN")