mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
28 lines
406 B
Solidity
28 lines
406 B
Solidity
contract A {
|
|
uint immutable x = x + 1;
|
|
uint immutable y = x += 2;
|
|
|
|
constructor(uint) m(x += 16) m(x += 32) {
|
|
x += 64;
|
|
x += 128;
|
|
}
|
|
|
|
modifier m(uint) {
|
|
_;
|
|
}
|
|
|
|
function get() public returns (uint) {
|
|
return x;
|
|
}
|
|
}
|
|
|
|
contract B is A(A.x += 8) {
|
|
constructor(uint) {}
|
|
}
|
|
|
|
contract C is B {
|
|
constructor() B(x += 4) {}
|
|
}
|
|
// ----
|
|
// get() -> 0xff
|