-
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.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 Bbuild.sbt
javacOptions ++= Seq(
"-Xlint:preview",
"--enable-preview",
"--release",
scala.util.Properties.javaSpecVersion
)
scalaVersion := "3.3.1"project/build.properties
sbt.version=1.9.6sbt -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
Note
unkarjedy
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.