diff options
Merge pull request #3752 from ethereum/fixStateVariableParsing
Fix state variable parsing
Diffstat (limited to 'test/libsolidity/syntaxTests/functionTypes/internal_function_as_external_parameter.sol')
-rw-r--r-- | test/libsolidity/syntaxTests/functionTypes/internal_function_as_external_parameter.sol | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/functionTypes/internal_function_as_external_parameter.sol b/test/libsolidity/syntaxTests/functionTypes/internal_function_as_external_parameter.sol new file mode 100644 index 00000000..fa92d559 --- /dev/null +++ b/test/libsolidity/syntaxTests/functionTypes/internal_function_as_external_parameter.sol @@ -0,0 +1,8 @@ +// It should not be possible to give internal functions +// as parameters to external functions. +contract C { + function f(function(uint) internal returns (uint) x) public { + } +} +// ---- +// TypeError: (124-164): Internal or recursive type is not allowed for public or external functions. |