Open pgebal opened 1 year ago
I've given a bad example. It's not about any unreachable code. It's about when a conditation or an assert
is used in unreachable code.
Example:
contract C {
function f() public pure {
uint x = 0;
while (x < 3) {
if (x >= 0) {
++x;
break;
}
if (x == 1)
x == 2;
}
assert(x == 1);
}
}
Then condition in line 9 should be reported as unreachable.
Environment
Steps to Reproduce
Use the following standard json settings file:
to compile the following contract
unreachable code in line 9 is not reported.