disable short circuits for unreachable statements detection (IDEA-58305; IDEA-70953; IDEA-70948)

This commit is contained in:
Anna Kozlova
2014-10-30 11:50:05 +01:00
parent 39e294f875
commit d0e6c61fde
2 changed files with 41 additions and 1 deletions
@@ -352,8 +352,48 @@ class NestedFinallyTest {
}
}
class Good0 {
private final int i;
Good0() {
while ((i = 1) != 0 && false) {
}
}
}
class Good1 {
void reachable() {
for (;true && true || false; ) {
reachable();
}
}
}
class Good11 {
void good() {
for (;true || true;) {
good();
}
}
}
class Good2 {
Good2() {
boolean b;
while (false && (b = false)) {}
}
}
class Good3 {
static void main(String[] args) {
do {
} while (test() || true);
System.out.println("2");
}
static boolean test() {
System.out.println("1");
return false;
}
}