Skip to content

Commit

Permalink
make -target support JVM 17
Browse files Browse the repository at this point in the history
  • Loading branch information
SethTisue committed Feb 9, 2021
1 parent d290587 commit 49d7ecf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion project/ScalaOptionParser.scala
Expand Up @@ -140,5 +140,5 @@ object ScalaOptionParser {
private def scaladocPathSettingNames = List("-doc-root-content", "-diagrams-dot-path")
private def scaladocMultiStringSettingNames = List("-doc-external-doc")

private val targetSettingNames = (8 to 16).map(_.toString).flatMap(v => v :: s"jvm-1.$v" :: s"jvm-$v" :: s"1.$v" :: Nil).toList
private val targetSettingNames = (8 to 17).map(_.toString).flatMap(v => v :: s"jvm-1.$v" :: s"jvm-$v" :: s"1.$v" :: Nil).toList
}
Expand Up @@ -80,6 +80,7 @@ abstract class BackendUtils extends PerRunInit {
case "14" => asm.Opcodes.V14
case "15" => asm.Opcodes.V15
case "16" => asm.Opcodes.V16
case "17" => asm.Opcodes.V17
// to be continued...
})

Expand Down
Expand Up @@ -73,7 +73,7 @@ trait StandardScalaSettings { _: MutableSettings =>
object StandardScalaSettings {
// not final in case some separately compiled client code wanted to depend on updated values
val MinTargetVersion = 8
val MaxTargetVersion = 16
val MaxTargetVersion = 17

private val AllTargetVersions = (MinTargetVersion to MaxTargetVersion).map(_.toString).to(List)
}
5 changes: 4 additions & 1 deletion test/junit/scala/tools/nsc/settings/TargetTest.scala
Expand Up @@ -62,8 +62,11 @@ class TargetTest {
check("-target:jvm-16", "16")
check("-target:16", "16")

check("-target:jvm-17", "17")
check("-target:17", "17")

checkFail("-target:jvm-6") // no longer
checkFail("-target:jvm-17") // not yet...
checkFail("-target:jvm-18") // not yet...
checkFail("-target:jvm-3000") // not in our lifetime
checkFail("-target:msil") // really?

Expand Down

0 comments on commit 49d7ecf

Please sign in to comment.