RFR: JDK-8246353: Sealed types not supported by jshell

Vicente Romero vicente.romero at oracle.com
Wed Jun 3 16:33:24 UTC 2020


looks good to me,

Thanks,
Vicente

On 6/3/20 6:16 AM, Jan Lahoda wrote:
> Hi,
>
> JShell does not support sealed types yet, this patch attempts to solve 
> it. This patch:
> -adds "permits" clauses to header dependencies of the class that 
> defines it (so that JShell correctly detects the permitted classes 
> must be added before the class is defined)
> -JShell will not clear the final modifier, on any element (class, 
> method, variable) before compiling the snippet
> -javac will not report the "no sealed superclass" error for cases like:
> non-sealed class I extends Undefined {}
> (this makes support for non-sealed in JShell much easier, and is the 
> right thing to do, I believe.)
>
> Proposed webrev:
> http://cr.openjdk.java.net/~jlahoda/8246353/webrev.00/
>
> JBS: https://bugs.openjdk.java.net/browse/JDK-8246353
>
> How does this look?
>
> Thanks,
>    Jan



More information about the compiler-dev mailing list