solidity/test/libsolidity/smtCheckerTests/loops/do_while_break_2.sol
2019-12-09 15:32:08 +01:00

22 lines
317 B
Solidity

pragma experimental SMTChecker;
contract C {
function f() public pure {
uint a = 0;
while (true) {
do {
break;
a = 2;
} while (true);
a = 1;
break;
}
assert(a == 1);
}
}
// ====
// SMTSolvers: z3
// ----
// Warning: (128-133): Unreachable code.
// Warning: (147-151): Unreachable code.