diff --git a/test/libsolidity/syntaxTests/errors/internal_type.sol b/test/libsolidity/syntaxTests/errors/internal_type.sol new file mode 100644 index 000000000..b88a27435 --- /dev/null +++ b/test/libsolidity/syntaxTests/errors/internal_type.sol @@ -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. diff --git a/test/libsolidity/syntaxTests/events/internal_type.sol b/test/libsolidity/syntaxTests/events/internal_type.sol new file mode 100644 index 000000000..1e584a8eb --- /dev/null +++ b/test/libsolidity/syntaxTests/events/internal_type.sol @@ -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.