mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
23 lines
350 B
Solidity
23 lines
350 B
Solidity
contract C {
|
|
uint256 public x;
|
|
modifier run() {
|
|
for (uint256 i = 0; i < 10; i++) {
|
|
_;
|
|
break;
|
|
}
|
|
}
|
|
|
|
function f() public run {
|
|
uint256 k = x;
|
|
uint256 t = k + 1;
|
|
x = t;
|
|
}
|
|
}
|
|
// ====
|
|
// compileViaYul: also
|
|
// compileToEwasm: also
|
|
// ----
|
|
// x() -> 0
|
|
// f() ->
|
|
// x() -> 1
|