mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow structs in events without ABIEncoderV2
This commit is contained in:
@@ -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.
|
||||
Reference in New Issue
Block a user