JVM IR: report warning instead of error for language/API version 1.2
This is needed for testing JVM IR on existing projects which for some reason are still on Kotlin 1.2.
This commit is contained in:
+3
-2
@@ -360,8 +360,9 @@ class K2JVMCompilerArguments : CommonCompilerArguments() {
|
||||
|| languageVersionSettings.apiVersion < ApiVersion.KOTLIN_1_3
|
||||
) {
|
||||
collector.report(
|
||||
CompilerMessageSeverity.ERROR,
|
||||
"IR backend cannot be used with language or API version below 1.3"
|
||||
CompilerMessageSeverity.STRONG_WARNING,
|
||||
"IR backend does not support language or API version lower than 1.3. " +
|
||||
"This can lead to unexpected behavior or compilation failures"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
warning: API version 1.2 is deprecated and its support will be removed in a future version of Kotlin
|
||||
error: IR backend cannot be used with language or API version below 1.3
|
||||
COMPILATION_ERROR
|
||||
warning: IR backend does not support language or API version lower than 1.3. This can lead to unexpected behavior or compilation failures
|
||||
OK
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
warning: language version 1.2 is deprecated and its support will be removed in a future version of Kotlin
|
||||
error: IR backend cannot be used with language or API version below 1.3
|
||||
COMPILATION_ERROR
|
||||
warning: IR backend does not support language or API version lower than 1.3. This can lead to unexpected behavior or compilation failures
|
||||
OK
|
||||
|
||||
Reference in New Issue
Block a user