solidity/test/libsolidity/syntaxTests/controlFlow/unreachableCode/assembly/for_break.sol
2022-04-01 23:41:18 -05:00

14 lines
335 B
Solidity

contract C {
function f() public pure {
assembly {
for { let a := 0} lt(a,1) { a := add(a, 1) } {
break
let b := 42
}
}
}
}
// ----
// Warning 5740: (103-117='a := add(a, 1)'): Unreachable code.
// Warning 5740: (160-171='let b := 42'): Unreachable code.