> Switch statements can correctly compile without being contained in braces
For me, they compile, but they don't work. Eg. This code:
GWT.log("Test 1 - Start");
switch (1) {
case 1 -> {
GWT.log("Test 1 - 1");
}
case 2 -> {
GWT.log("Test 1 - 2");
}
case 3 -> {
GWT.log("Test 1 - 3");
}
}
GWT.log("Test 1 - Done");
GWT.log("Test 2 - Start");
switch (1) {
case 1 -> GWT.log("Test 2 - 1");
case 2 -> GWT.log("Test 2 - 2");
case 3 -> GWT.log("Test 2 - 3");
}
GWT.log("Test 2 - Done");
Will never get to the last "Test 2 - Done" line. The output will be:
Test 1 - Start
Test 1 - 1
Test 1 - Done
Test 2 - Start
Test 2 - 1
Is this a known issue?
Thanks.