Disallow structs in events without ABIEncoderV2

This commit is contained in:
Leonardo Alt
2018-09-06 17:11:53 +02:00
committed by chriseth
parent 507cdf6de2
commit c577e043a4
10 changed files with 47 additions and 0 deletions
@@ -0,0 +1,7 @@
contract C {
function f() public {
emit;
}
}
// ----
// ParserError: (45-46): Expected event name or path.
@@ -0,0 +1,5 @@
contract c {
event E(uint[][]);
}
// ----
// TypeError: (25-33): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature.
@@ -0,0 +1,4 @@
contract c {
event E(uint[2][]);
}
// ----
@@ -0,0 +1,6 @@
contract c {
struct S { uint x; uint[][] arr; }
event E(S);
}
// ----
// TypeError: (61-62): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature.
@@ -0,0 +1,6 @@
contract c {
struct S { uint a ; }
event E(S);
}
// ----
// TypeError: (51-52): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature.
@@ -0,0 +1,6 @@
contract c {
struct S { uint a ; }
event E(S indexed);
}
// ----
// TypeError: (51-52): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature.