On Fri, 5 May 2023 17:08:35 GMT, Vicente Romero <vrom...@openjdk.org> wrote:

>> Jim Laskey has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Recommended changes #2
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java 
> line 3999:
> 
>> 3997:         Name name = names.fromString(simplename);
>> 3998:         JCModifiers anonMods = F.at(primaryPos)
>> 3999:                 
>> .Modifiers(Flags.FINAL|Flags.MANDATED|Flags.SYNTHETIC|Flags.UNNAMED_CLASS, 
>> List.nil());
> 
> I wonder if testing if a class has flags: 
> `Flags.FINAL|Flags.MANDATED|Flags.SYNTHETIC` should be enough to know if it 
> is unnamed or not and we don't need to use the new `UNNAMED_CLASS` flag

`Flags.MANDATED` on a class is currently enough to know if it's a unnamed class 
or not, but it's not enough for classes not produced by javac.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13689#discussion_r1186335538

Reply via email to