RFR: 8246778: Compiler implementation for Sealed Classes (Second Preview) [v2]
jlahoda at openjdk.java.net
Wed Dec 2 12:13:54 UTC 2020
On Wed, 2 Dec 2020 12:08:09 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> @lahodaj It is okay with me if `getPermittedSubclasses` returns the permitted subtypes matching the runtime view (that matches the current specification to me) and revisit this API as a follow up.
> Yes, would be a surprise if getPermittedSubclasses returned Class objects for classes that are not subclasses. I think it should be okay to separate that out to a separate issue so that it can be further re-examined after JEP 397 goes in.
FWIW: I plan to change the method to not return such Class objects. It just will do the verification in Java, while for getNestMembers it is done in native. The follow up is for investigate the possibility of making the internal behavior consistent with how getNestMembers work.
More information about the compiler-dev