solidity/test/libsolidity/syntaxTests/immutable/function_pointer_reading.sol
2023-07-14 15:29:32 +02:00

13 lines
224 B
Solidity

abstract contract B {
uint immutable x;
constructor(function() internal returns(uint) fp) {
x = fp();
}
}
contract C is B(C.f) {
function f() internal view returns(uint) { return x + 2; }
}
// ----