Java: Don't reuse cached ControlFlow when the context is not equivalent (IDEA-168768)

This commit is contained in:
Pavel Dolgov
2017-05-15 12:34:52 +03:00
parent e4ceb35dce
commit c7d8ad3401
3 changed files with 37 additions and 1 deletions
@@ -0,0 +1,35 @@
public class IDEA168768 {
private final boolean b = false;
private boolean b2 = false;
public void m() throws Exception {
final long s;
if (b) {
s = 1;
}
if (b) {
System.out.println(s);
}
}
public void m1() throws Exception {
final long s;
final boolean b1 = false;
if (b1) {
s = 1;
}
if (b1) {
System.out.println(s);
}
}
public void m2() throws Exception {
final long s;
if (b2) {
s = 1;
}
if (b2) {
System.out.println(<error descr="Variable 's' might not have been initialized">s</error>);
}
}
}