Open
Description
Compiler version
- 3.3.1
- 3.4.0-RC1-bin-20230921-3d539e6-NIGHTLY
Minimized code
Install JDK 21
A.java
void main() {
System.out.println("hello");
}
B.scala
class B
build.sbt
javacOptions ++= Seq(
"-Xlint:preview",
"--enable-preview",
"--release",
scala.util.Properties.javaSpecVersion
)
scalaVersion := "3.3.1"
project/build.properties
sbt.version=1.9.6
sbt -J--enable-preview compile
Output
[error] 1 |void main() {
[error] | ^^^^
[error] | illegal start of type declaration
[error] one error found
[error] (Compile / compileIncremental) Compilation failed
Expectation
success compile