-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
area:jdkIssues tied to artifacts published under a particular jdkIssues tied to artifacts published under a particular jdkcompat:javacompat:java:jepIssues corresponding to a JEP (JDK Enhancement Proposal)Issues corresponding to a JEP (JDK Enhancement Proposal)compat:java:jep:stableIssues corresponding to a JEP which got already delivered as a stable feature in a JDK releaseIssues corresponding to a JEP which got already delivered as a stable feature in a JDK releaseitype:enhancementitype:spikeWe need to spend time and investigate something, before we decide what to do next.We need to spend time and investigate something, before we decide what to do next.
Description
Compiler version
- 3.3.3
- 3.4.2
- 3.5.0-RC1
- 3.5.1-RC1-bin-20240606-27a3f80-NIGHTLY
Minimized code
$ java --version
openjdk 23-ea 2024-09-17
OpenJDK Runtime Environment (build 23-ea+25-2094)
OpenJDK 64-Bit Server VM (build 23-ea+25-2094, mixed mode, sharing)
B.scala
class B
A.java
import module java.base;
public class A {
}
build.sbt
javacOptions ++= Seq("--enable-preview", "--release", scala.util.Properties.javaSpecVersion)
scalaVersion := "3.5.0-RC1"
project/build.properties
sbt.version=1.10.0
Output
[error] -- Error: /my-example-project/A.java:1:14 ------------------
[error] 1 |import module java.base;
[error] | ^^^^
[error] | ';' expected but identifier found.
[error] one error found
[error] (Compile / compileIncremental) Compilation failed
Expectation
don't report error
note
- Scala 2.13.14 has same issue support
JEP 476: Module Import Declarations
inJavaParsers
bug#13005 - https://openjdk.org/jeps/476
He-Pin
Metadata
Metadata
Assignees
Labels
area:jdkIssues tied to artifacts published under a particular jdkIssues tied to artifacts published under a particular jdkcompat:javacompat:java:jepIssues corresponding to a JEP (JDK Enhancement Proposal)Issues corresponding to a JEP (JDK Enhancement Proposal)compat:java:jep:stableIssues corresponding to a JEP which got already delivered as a stable feature in a JDK releaseIssues corresponding to a JEP which got already delivered as a stable feature in a JDK releaseitype:enhancementitype:spikeWe need to spend time and investigate something, before we decide what to do next.We need to spend time and investigate something, before we decide what to do next.