mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
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:
parent
cc915f023e
commit
2309ae3edd
9
test/libsolidity/syntaxTests/errors/internal_type.sol
Normal file
9
test/libsolidity/syntaxTests/errors/internal_type.sol
Normal 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.
|
11
test/libsolidity/syntaxTests/events/internal_type.sol
Normal file
11
test/libsolidity/syntaxTests/events/internal_type.sol
Normal 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.
|
Loading…
Reference in New Issue
Block a user