JShell does not recognize "non-sealed" as a keyword at top level

Remi Forax forax at univ-mlv.fr
Tue Aug 31 21:46:43 UTC 2021

Hi all,
this code does not work in JShell.

sealed interface Component permits Label, Button, Canvas {}
record Label(String name) implements Component {}
final class Button implements Component {}
non-sealed class Canvas implements Component {}

We had a very similar bug with "sealed" not a long ago :(


More information about the compiler-dev mailing list