RFR: 8343306: javac is failing to determine if a class and a sealed interface are disjoint [v6]

Vicente Romero vromero at openjdk.org
Thu Nov 7 15:38:43 UTC 2024


On Thu, 7 Nov 2024 14:04:11 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   addressing review comments
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java line 1697:
> 
>> 1695:                         } else if (csym.isSealed()) {
>> 1696:                             return areDisjoint(isym, csym.getPermittedSubclasses());
>> 1697:                         } else if (isym.isSealed()) {
> 
> where did the freely extensible check go? That part is in the spec, but there's no code for it?

@mcimadamore I can add a comment in this section of the code that refers to why we think that the current checks cover the reference in the spec to freely extensible class

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21794#discussion_r1832893204


More information about the compiler-dev mailing list