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

Joe Darcy darcy at openjdk.org
Fri May 26 06:10:07 UTC 2023


On Thu, 25 May 2023 14:32:44 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 one additional commit since the last revision:
> 
>   Improving error recovery in presence of less important syntactic errors in top-level methods and fields.
>   
>   Author: Jan Lahoda <jlahoda at openjdk.org>

test/jdk/tools/launcher/InstanceMainTest.java line 31:

> 29:  * @run main InstanceMainTest
> 30:  */
> 31: public class InstanceMainTest extends TestHelper {

By my reading of the spec, "main" methods can be defined in record classes and enum classes as well as normal classes.
Are there tests for record and enum main method operation?

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

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



More information about the build-dev mailing list