solidity/test/libsolidity/semanticTests/constructor_inheritance_init_order.sol
2023-05-11 10:56:55 -05:00

19 lines
280 B
Solidity

contract A {
uint x;
constructor() {
x = 42;
}
function f() public returns(uint256) {
return x;
}
}
contract B is A {
uint public y = f();
}
// ====
// compileViaYul: true
// ----
// constructor() ->
// gas irOptimized: 120936
// y() -> 42