solidity/test/libsolidity/syntaxTests/functionTypes/internal_function_as_external_parameter.sol

9 lines
292 B
Solidity
Raw Normal View History

2018-03-16 10:33:05 +00:00
// It should not be possible to give internal functions
// as parameters to external functions.
2018-03-16 10:20:06 +00:00
contract C {
function f(function(uint) internal returns (uint) x) public {
}
}
2018-03-16 10:33:05 +00:00
// ----
// TypeError: (124-164): Internal or recursive type is not allowed for public or external functions.