RFR: 8322477: order of subclasses in the permits clause can differ between compilations [v3]

Vicente Romero vromero at openjdk.org
Wed Jan 10 17:27:43 UTC 2024


On Wed, 10 Jan 2024 16:32:10 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

>> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   updating regression test
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java line 1334:
> 
>> 1332: 
>> 1333:         public void addPermittedSubclass(ClassSymbol csym, int pos) {
>> 1334:             if (isPermittedExplicit) {
> 
> If I understand it properly, the codepaths to add implicitly and explicitly declared permitted subclasses are completely different. And when the permitted subclasses are explicit, the `addPermittedSubclass` won't be called.
> 
> For consideration: just using `Assert.check(!isPermittedExplicit)`, drop the if.

sure will do, thanks

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17284#discussion_r1447693614


More information about the compiler-dev mailing list