Suggest using a newer JDK for unavailable options in -java-output-version
#20373
Labels
better-errors
Issues concerned with improving confusing/unhelpful diagnostic messages
itype:enhancement
Compiler version
3.3.3
Minimized code
Output
Expectation
According to the JDK compatibility page: https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html
Scala 3 supports Java
21
since3.3.1
.Yet, despite that, the compiler rejects
21
as a valid Java output version. Furthermore, printing the-help
of the compiler and looking for-java-output-version
only lists up to Java17
as supported targets.I would expect to be able to use
21
as a valid Java output version. This, in turn, should allow me to:21
; likeCharacter.isEmoji
: https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/Character.html#isEmoji(int)65.0
: https://javaalmanac.io/bytecode/versions/21
language features; like pattern matching: https://docs.oracle.com/en/java/javase/21/language/pattern-matching-switch-expressions-and-statements.htmlThe text was updated successfully, but these errors were encountered: