For example, this loop is not recognized because the condition is not rewritten first to an expression, since it has side-effects with the x++. Special cases have to be detected for expressions with increment side-effects.
int whileWithContinue(int x) {
while (x++ < 10) {
if (x % 2 == 0) {
continue;
}
else {
println(x);
}
}
return x;
}
For example, this loop is not recognized because the condition is not rewritten first to an expression, since it has side-effects with the
x++
. Special cases have to be detected for expressions with increment side-effects.