solidity/test/libsolidity/semanticTests/asmForLoop/for_loop_break.sol
2022-05-19 20:23:28 +02:00

16 lines
290 B
Solidity

contract C {
function f() public returns (uint i) {
assembly {
for {} lt(i, 10) { i := add(i, 1) }
{
if eq(i, 6) { break }
i := add(i, 1)
}
}
}
}
// ====
// compileToEwasm: also
// ----
// f() -> 6