Merge pull request #11480 from ethereum/event-mapping-fatal-error

Errors about nested mapping in event parameter are fatal.
This commit is contained in:
chriseth
2021-06-03 11:39:26 +02:00
committed by GitHub
8 changed files with 30 additions and 6 deletions
@@ -0,0 +1,9 @@
error E1(function() internal);
error E2(S);
struct S {
S[] ss;
}
// ----
// TypeError 3417: (9-29): Internal or recursive type is not allowed as error parameter type.
// TypeError 3417: (40-41): Internal or recursive type is not allowed as error parameter type.
@@ -4,6 +4,3 @@ contract C {
}
// ----
// TypeError 3448: (14-35): Type containing a (nested) mapping is not allowed as error parameter type.
// TypeError 3417: (14-35): Internal or recursive type is not allowed as error parameter type.
// TypeError 3448: (70-91): Type containing a (nested) mapping is not allowed as error parameter type.
// TypeError 3417: (70-91): Internal or recursive type is not allowed as error parameter type.
@@ -3,5 +3,3 @@ contract c {
}
// ----
// TypeError 3448: (41-72): Type containing a (nested) mapping is not allowed as event parameter type.
// TypeError 3417: (41-72): Internal or recursive type is not allowed as event parameter type.
// TypeError 8598: (17-132): More than 4 indexed arguments for anonymous event.
@@ -0,0 +1,11 @@
struct S {
S[] ss;
}
contract C {
event E1(function() internal);
event E2(S);
}
// ----
// TypeError 3417: (52-72): Internal or recursive type is not allowed as event parameter type.
// TypeError 3417: (87-88): Internal or recursive type is not allowed as event parameter type.
@@ -0,0 +1,3 @@
error E (mapping (uint => uint));
// ----
// TypeError 3448: (9-31): Type containing a (nested) mapping is not allowed as error parameter type.
@@ -0,0 +1,5 @@
contract C {
event E (mapping (uint => uint) [2]);
}
// ----
// TypeError 3448: (26-52): Type containing a (nested) mapping is not allowed as event parameter type.