[lworld] RFR: 8279368: [lworld] Add parser support for declaration of value classes

Aggelos Biboudis duke at openjdk.java.net
Mon Jan 10 23:19:45 UTC 2022


On Mon, 10 Jan 2022 12:30:11 GMT, Srikanth Adayapalam <sadayapalam at openjdk.org> wrote:

> Enhance the parser to accept value class declarations

Marked as reviewed by biboudis at github.com (no known OpenJDK username).

This looks good to me 💯

I believe the following observations are not related to this PR so I am accepting it, but I would like to hear what you think:

1. `public native value class FooTest { }` passes but also `public native class FooTest { }`. `native` shouldn't be applicable here at all here I think.

2. An inconsistency in error reporting:


FooTest.java:2: error: repeated modifier
public native native class FooTest { }
              ^


but:

FooTest.java:2: error: class, interface, enum, or record expected
public value value class FooTest { }
       ^


What do you think?

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

PR: https://git.openjdk.java.net/valhalla/pull/596



More information about the valhalla-dev mailing list