aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/emit
diff options
context:
space:
mode:
authorLeonardo Alt <leo@ethereum.org>2018-08-02 01:01:50 +0800
committerLeonardo Alt <leo@ethereum.org>2018-08-03 19:41:27 +0800
commit20c6cea7bb803a5217f6b96062c7bce150ba2b73 (patch)
tree4e1dcf9400c354b05aaffdc42daf4bfcd988c7fc /test/libsolidity/syntaxTests/emit
parentda6cefd475210a9bcae0aad80c03f3679ae00f56 (diff)
downloaddexon-solidity-20c6cea7bb803a5217f6b96062c7bce150ba2b73.tar.gz
dexon-solidity-20c6cea7bb803a5217f6b96062c7bce150ba2b73.tar.zst
dexon-solidity-20c6cea7bb803a5217f6b96062c7bce150ba2b73.zip
Disallow structs in events without ABIEncoderV2
Diffstat (limited to 'test/libsolidity/syntaxTests/emit')
-rw-r--r--test/libsolidity/syntaxTests/emit/emit_empty.sol7
-rw-r--r--test/libsolidity/syntaxTests/emit/emit_non_event.sol10
2 files changed, 17 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/emit/emit_empty.sol b/test/libsolidity/syntaxTests/emit/emit_empty.sol
new file mode 100644
index 00000000..819d88fe
--- /dev/null
+++ b/test/libsolidity/syntaxTests/emit/emit_empty.sol
@@ -0,0 +1,7 @@
+contract C {
+ function f() public {
+ emit;
+ }
+}
+// ----
+// ParserError: (45-46): Expected event name or path.
diff --git a/test/libsolidity/syntaxTests/emit/emit_non_event.sol b/test/libsolidity/syntaxTests/emit/emit_non_event.sol
new file mode 100644
index 00000000..d5045ddf
--- /dev/null
+++ b/test/libsolidity/syntaxTests/emit/emit_non_event.sol
@@ -0,0 +1,10 @@
+contract C {
+ uint256 Test;
+
+ function f() public {
+ emit Test();
+ }
+}
+// ----
+// TypeError: (63-69): Type is not callable
+// TypeError: (63-67): Expression has to be an event invocation.