solidity/test/libsolidity/semanticTests/modifiers/continue_in_modifier.sol

24 lines
370 B
Solidity
Raw Normal View History

contract C {
uint256 public x;
modifier run() {
for (uint256 i = 0; i < 10; i++) {
if (i % 2 == 1) continue;
_;
}
}
function f() public run {
uint256 k = x;
uint256 t = k + 1;
x = t;
}
}
2020-11-30 17:59:49 +00:00
// ====
// compileViaYul: also
2021-04-23 15:59:01 +00:00
// compileToEwasm: also
// ----
// x() -> 0
// f() ->
// x() -> 5