RFR: JDK-8306112 Implementation of JEP 445: Flexible Main Methods and Anonymous Main Classes (Preview) [v2]

Jim Laskey jlaskey at openjdk.org
Thu Apr 27 18:22:26 UTC 2023


On Thu, 27 Apr 2023 14:55:01 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Jim Laskey has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   PreviewFeatures.isEnabled()
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java line 2433:
> 
>> 2431:         if (kind.contains(KindSelector.TYP)) {
>> 2432:             sym = findType(env, name);
>> 2433:             if ((sym.flags() & ANONYMOUS_MAIN_CLASS) != 0) {
> 
> If `sym` is also `SYNTHTIC` (which it is) - do you need this? In what case? E.g. if there's a legitimate case for this I'm wondering if we should just test for `SYNTHETIC` rather than `ANONYMOUS_MAIN_CLASS`.

Yes, this is a remnant from earlier work.

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

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



More information about the build-dev mailing list