Loading... (original) (raw)
Type:
Bug
Resolution: Fixed
Priority:
P2
Fix Version/s: 12
Affects Version/s: 12
Component/s: tools
Labels:
Subcomponent:
javacResolved In Build:
b22Verification:
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
---