This test case:
public class Sample1 {
final int x;
Sample1() {
for(;;x=1) {
x=2;
break;
}
}
}
is rejected by javac but should be accepted. See the discussion here [1]
[1] http://mail.openjdk.java.net/pipermail/compiler-dev/2018-February/011646.html
public class Sample1 {
final int x;
Sample1() {
for(;;x=1) {
x=2;
break;
}
}
}
is rejected by javac but should be accepted. See the discussion here [1]
[1] http://mail.openjdk.java.net/pipermail/compiler-dev/2018-February/011646.html
- relates to
-
JDK-4660984 16.2.12: Clarify DU/DA analysis for loop containing break
-
- Resolved
-