-
Notifications
You must be signed in to change notification settings - Fork 21
scala.tools.nsc.javac.JavaParsers can't parse JDK14 records #11908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Is this taken up? |
@mghildiy nearly certain nobody is working on this |
records will be out of preview starting with Java 16, to be released in March: https://openjdk.java.net/jeps/395 |
This would make an excellent project for an interested volunteer. |
I'd be interested in picking this up. Just to confirm: does |
@harpocrates yes iirc only what is required for interop. I happen to be reading Plato atm. Socrates wrote nothing. Presumably, Harpocrates spoke nothing. Appreciate the midday chuckle. |
JDK16 introduced records (JEP 395) for reducing the boilerplate associated with small immutable classes. This new construct automatically * makes fields `private`/`final` and generates accessors for them * overrides `equals`/`hashCode`/`toString` * creates a `final` class that extends `java.lang.Record` The details are in "8.10. Record Classes" of the Java language specification. Fixes scala/bug#11908
JDK16 introduced records (JEP 395) for reducing the boilerplate associated with small immutable classes. This new construct automatically * makes fields `private`/`final` and generates accessors for them * overrides `equals`/`hashCode`/`toString` * creates a `final` class that extends `java.lang.Record` The details are in "8.10. Record Classes" of the Java language specification. Fixes scala/bug#11908
Uh oh!
There was an error while loading. Please reload this page.
reproduction steps
https://openjdk.java.net/jeps/359
https://github.com/scala/scala/blob/a20345d2380dfc63ff0aa41d4ab97b538a9f74a7/src/compiler/scala/tools/nsc/javac/JavaParsers.scala#L874
build.sbt
A.java
B.scala
sbt version 1.3.8
problem
expectation
no error.
workaround
The text was updated successfully, but these errors were encountered: