solidity/test/libsolidity/semanticTests/immutable/internal_function_pointer.sol
2022-05-19 20:23:28 +02:00

16 lines
261 B
Solidity

contract C {
function() internal view returns(uint256) immutable z;
constructor() {
z = f;
}
function f() public view returns (uint256) {
return 7;
}
function callZ() public view returns (uint) {
return z();
}
}
// ----
// f() -> 7
// callZ() -> 7