solidity/test/libsolidity/semanticTests/asmForLoop/for_loop_continue.sol

16 lines
310 B
Solidity
Raw Normal View History

contract C {
function f() public returns (uint k) {
assembly {
for {let i := 0} lt(i, 10) { i := add(i, 1) }
{
if eq(mod(i, 2), 0) { continue }
k := add(k, 1)
}
}
}
}
2019-05-23 14:38:11 +00:00
// ====
// compileViaYul: also
// ----
// f() -> 5