-
Couldn't load subscription status.
- Fork 21
Open
Milestone
Description
Reproduction steps
Scala version: 2.13.14
$ 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 BA.java
import module java.base;
public class A {
}build.sbt
javacOptions ++= Seq("--enable-preview", "--release", scala.util.Properties.javaSpecVersion)
scalaVersion := "2.13.14"project/build.properties
sbt.version=1.10.0Problem
run sbt compile
[error] my-example-project-path/A.java:1:15: `;` expected but identifier found.
[error] import module java.base;
[error] ^
[error] one error found
[error] (Compile / compileIncremental) Compilation failed
workaround
set compileOrder := CompileOrder.JavaThenScala or compileOrder := CompileOrder.ScalaThenJava in sbt
gaeljw