solidity/test/libsolidity/semanticTests/state_variables_init_order_2.sol

18 lines
268 B
Solidity
Raw Normal View History

contract A {
uint public x = 0;
uint y = f();
function f() public returns (uint256) {
++x;
return 42;
}
}
contract B is A {
uint public z;
2020-06-23 12:14:24 +00:00
constructor() {
z = x;
}
}
// ====
// compileViaYul: also
// ----
// z() -> 1