[Compiler CLI] Use LanguageVersion.LATEST_STABLE instead of KotlinVersion.CURRENT for java type enhancement settings to prevent dependency on kotlin version.
This commit is contained in:
committed by
teamcity
parent
2c51799e0a
commit
0689d74353
+3
-1
@@ -18,6 +18,8 @@ package org.jetbrains.kotlin.cli.common.arguments
|
|||||||
|
|
||||||
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity
|
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity
|
||||||
import org.jetbrains.kotlin.cli.common.messages.MessageCollector
|
import org.jetbrains.kotlin.cli.common.messages.MessageCollector
|
||||||
|
import org.jetbrains.kotlin.config.LanguageVersion
|
||||||
|
import org.jetbrains.kotlin.config.toKotlinVersion
|
||||||
import org.jetbrains.kotlin.load.java.*
|
import org.jetbrains.kotlin.load.java.*
|
||||||
import org.jetbrains.kotlin.name.FqName
|
import org.jetbrains.kotlin.name.FqName
|
||||||
import org.jetbrains.kotlin.name.isSubpackageOf
|
import org.jetbrains.kotlin.name.isSubpackageOf
|
||||||
@@ -202,7 +204,7 @@ class JavaTypeEnhancementStateParser(
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val DEFAULT = JavaTypeEnhancementStateParser(MessageCollector.NONE, KotlinVersion.CURRENT)
|
private val DEFAULT = JavaTypeEnhancementStateParser(MessageCollector.NONE, LanguageVersion.LATEST_STABLE.toKotlinVersion())
|
||||||
private const val NULLABILITY_ANNOTATIONS_COMPILER_OPTION = "-Xnullability-annotations"
|
private const val NULLABILITY_ANNOTATIONS_COMPILER_OPTION = "-Xnullability-annotations"
|
||||||
|
|
||||||
fun parsePlainNullabilityAnnotationReportLevels(nullabilityAnnotations: String): Pair<FqName, ReportLevel> =
|
fun parsePlainNullabilityAnnotationReportLevels(nullabilityAnnotations: String): Pair<FqName, ReportLevel> =
|
||||||
|
|||||||
Reference in New Issue
Block a user