-
Bug
-
Resolution: Fixed
-
P2
-
12
-
b22
-
Verified
Reported here:
http://mail.openjdk.java.net/pipermail/compiler-dev/2018-November/012637.html
Source code:
---
public class Java12Test {
public static void main(String[] args) {
String s = "foo";
System.out.println(s + switch(0) {
default -> {
s = "bar";
break 1;
}
});
System.out.println(s);
}
}
---
Prints:
---
foo1
foo
---
http://mail.openjdk.java.net/pipermail/compiler-dev/2018-November/012637.html
Source code:
---
public class Java12Test {
public static void main(String[] args) {
String s = "foo";
System.out.println(s + switch(0) {
default -> {
s = "bar";
break 1;
}
});
System.out.println(s);
}
}
---
Prints:
---
foo1
foo
---