solidity/test/libsolidity/semanticTests/immutable/internal_function_pointer.sol
2020-05-04 15:00:50 +02:00

18 lines
299 B
Solidity

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