-
Bug
-
Resolution: Fixed
-
P4
-
12, 13, 14, 15
-
b21
In jshell, if I have a switch statement with a single default label that contains code not reaching the end of the switch statement, jshell will give a syntax error. That used to work in JDK 11.
jshell> var foo = "foo"
foo ==> "foo"
jshell> switch (foo) { default: throw new AssertionError(); }
| Error:
| unreachable statement
| switch (foo) { default: throw new AssertionError(); }
| ^
jshell>
jshell> var foo = "foo"
foo ==> "foo"
jshell> switch (foo) { default: throw new AssertionError(); }
| Error:
| unreachable statement
| switch (foo) { default: throw new AssertionError(); }
| ^
jshell>