RFR: JDK-8306112 Implementation of JEP 445: Unnamed Classes and Instance Main Methods (Preview) [v8]

Jim Laskey james.laskey at oracle.com
Thu May 4 20:56:22 UTC 2023


I suppose that’s a possibility. But is it more informative to have the class print with the synthetic flag?

📱

> On May 4, 2023, at 5:54 PM, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
> 
> On Mon, 1 May 2023 13:06:24 GMT, Jim Laskey <jlaskey at openjdk.org> wrote:
> 
>>> Add flexible main methods and anonymous main classes to the Java language.
>> 
>> Jim Laskey has updated the pull request incrementally with two additional commits since the last revision:
>> 
>> - Anonymous main classes renamed to unnamed classes
>> - Add test
> 
> The compiler changes look good - I like howthe code got simpler by adding the main class wrapper at parser time. As I suggested elsewhere, do we want to change `Pretty` so that the AST of an unnamed class is rendered like if the unnamed class wasn't there (e.g. so that the output is like the source where the AST comes from) ?
> 
> -------------
> 
> Marked as reviewed by mcimadamore (Reviewer).
> 
> PR Review: https://git.openjdk.org/jdk/pull/13689#pullrequestreview-1413902695


More information about the core-libs-dev mailing list