JVM: allow -jvm-target 1.8 with -Xjdk-release=1.6

#KT-59098
This commit is contained in:
Alexander Udalov
2024-02-14 13:34:00 +01:00
committed by Space Team
parent 1bc08fc5b8
commit 12f393791b
8 changed files with 53 additions and 2 deletions
+5 -1
View File
@@ -1 +1,5 @@
fun clear(byteByffer: java.nio.ByteBuffer) = byteByffer.clear()
fun clear(byteByffer: java.nio.ByteBuffer) = byteByffer.clear()
fun path(): java.nio.file.Path? = null
fun stream() = java.util.stream.Stream.of(42)
@@ -0,0 +1,8 @@
-Xjdk-release=1.6
-jvm-target
1.8
-jdk-home
$JDK_11_0
$TESTDATA_DIR$/jdkRelease.kt
-d
$TEMP_DIR$
@@ -0,0 +1,7 @@
compiler/testData/cli/jvm/jdkRelease.kt:3:22: error: unresolved reference 'file'.
fun path(): java.nio.file.Path? = null
^^^^
compiler/testData/cli/jvm/jdkRelease.kt:5:26: error: unresolved reference 'stream'.
fun stream() = java.util.stream.Stream.of(42)
^^^^^^
COMPILATION_ERROR
@@ -0,0 +1,8 @@
-Xjdk-release=1.6
-jvm-target
1.8
-jdk-home
$JDK_1_8
$TESTDATA_DIR$/jdkRelease.kt
-d
$TEMP_DIR$
@@ -0,0 +1,2 @@
error: '-Xjdk-release=6' option is not supported by used JDK: $JDK_1_8
COMPILATION_ERROR