Hi all,
this snippet of code doesn't work with jshell.
jshell> var foo = "foo";
...> switch(foo) {
...> default -> throw new AssertionError();
...> }
foo ==> "foo"
| Error:
| unreachable statement
| }
| ^
Obviously, it works with javac.
regards,
Rémi