Added tests for internal or recursive types as event / error param

After converting the error about mapping parameter in event / error into a fatal type error, we were
missing tests that reached the "internal or recursive types" error.
This commit is contained in:
hrkrshnn 2021-06-03 10:43:52 +02:00
parent cc915f023e
commit 2309ae3edd
2 changed files with 20 additions and 0 deletions

View File

@ -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.

View File

@ -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.