From ffe7f224a6c9598284f100f842e3cfba58974d56 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Fri, 4 May 2018 05:21:28 +0100 Subject: Show proper error when trying to emit a non-event --- test/libsolidity/syntaxTests/emit_non_event.sol | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/libsolidity/syntaxTests/emit_non_event.sol (limited to 'test') diff --git a/test/libsolidity/syntaxTests/emit_non_event.sol b/test/libsolidity/syntaxTests/emit_non_event.sol new file mode 100644 index 00000000..1df6990d --- /dev/null +++ b/test/libsolidity/syntaxTests/emit_non_event.sol @@ -0,0 +1,10 @@ +contract C { + uint256 Test; + + function f() { + emit Test(); + } +} +// ---- +// TypeError: (56-62): Type is not callable +// TypeError: (56-60): Expression has to be an event invocation. -- cgit v1.2.3