Support -Xjdk-release=8 as alias for -Xjdk-release=1.8
#KT-53278 Fixed
This commit is contained in:
@@ -51,7 +51,12 @@ fun CompilerConfiguration.setupJvmSpecificArguments(arguments: K2JVMCompilerArgu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val jvmTargetValue = releaseTargetArg ?: jvmTargetArg
|
val jvmTargetValue = when (releaseTargetArg) {
|
||||||
|
"6" -> "1.6"
|
||||||
|
"8" -> "1.8"
|
||||||
|
null -> jvmTargetArg
|
||||||
|
else -> releaseTargetArg
|
||||||
|
}
|
||||||
if (jvmTargetValue != null) {
|
if (jvmTargetValue != null) {
|
||||||
val jvmTarget = JvmTarget.fromString(jvmTargetValue)
|
val jvmTarget = JvmTarget.fromString(jvmTargetValue)
|
||||||
if (jvmTarget != null) {
|
if (jvmTarget != null) {
|
||||||
|
|||||||
+4
@@ -0,0 +1,4 @@
|
|||||||
|
-Xjdk-release=8
|
||||||
|
$TESTDATA_DIR$/jdkRelease.kt
|
||||||
|
-d
|
||||||
|
$TEMP_DIR$
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
OK
|
||||||
@@ -607,6 +607,11 @@ public class CliTestGenerated extends AbstractCliTest {
|
|||||||
runTest("compiler/testData/cli/jvm/jdkRelease.args");
|
runTest("compiler/testData/cli/jvm/jdkRelease.args");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("jdkRelease8.args")
|
||||||
|
public void testJdkRelease8() throws Exception {
|
||||||
|
runTest("compiler/testData/cli/jvm/jdkRelease8.args");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("jspecifyByLv15.args")
|
@TestMetadata("jspecifyByLv15.args")
|
||||||
public void testJspecifyByLv15() throws Exception {
|
public void testJspecifyByLv15() throws Exception {
|
||||||
runTest("compiler/testData/cli/jvm/jspecifyByLv15.args");
|
runTest("compiler/testData/cli/jvm/jspecifyByLv15.args");
|
||||||
|
|||||||
Reference in New Issue
Block a user