Report incorrect JVM target only when @JvmRecord is actually used

This commit is contained in:
Denis.Zharkov
2020-12-08 16:48:31 +03:00
parent 920ed558ee
commit 92b402759b
15 changed files with 39 additions and 18 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ $TEMP_DIR$
1.5
-language-version
1.5
-cp
-jdk-home
$JDK_15$
-XXLanguage:+JvmRecordSupport
-jvm-target
+3 -1
View File
@@ -8,5 +8,7 @@ as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!
warning: language version 1.5 is experimental, there are no backwards compatibility guarantees for new language and library features
error: -XXLanguage:+JvmRecordSupport feature is only supported with JVM target 15 or later
compiler/testData/cli/jvm/jvmRecord.kt:1:1: error: using @JvmRecord is only allowed with -jvm-target 15 and -Xjvm-enable-preview flag enabled
@JvmRecord
^
COMPILATION_ERROR