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

8 lines
290 B
Solidity
Raw Normal View History

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