Update error about unsupported language and API versions
Set first supported version to 1.3 Add property for oldest depecated language version in order to control unsupported ones Report error on attempts to manually disable language feature from unsupported versions Update test data, drop compatibility tests for features from unsupported versions KT-36146 In progress
This commit is contained in:
@@ -248,6 +248,12 @@ enum class LanguageVersion(val major: Int, val minor: Int) : DescriptionAware {
|
||||
val isStable: Boolean
|
||||
get() = this <= LATEST_STABLE
|
||||
|
||||
val isDeprecated: Boolean
|
||||
get() = this >= OLDEST_DEPRECATED && this < FIRST_SUPPORTED
|
||||
|
||||
val isUnsupported: Boolean
|
||||
get() = this < OLDEST_DEPRECATED
|
||||
|
||||
val versionString: String
|
||||
get() = "$major.$minor"
|
||||
|
||||
@@ -265,7 +271,10 @@ enum class LanguageVersion(val major: Int, val minor: Int) : DescriptionAware {
|
||||
str.split(".", "-").let { if (it.size >= 2) fromVersionString("${it[0]}.${it[1]}") else null }
|
||||
|
||||
@JvmField
|
||||
val FIRST_SUPPORTED = KOTLIN_1_2
|
||||
val OLDEST_DEPRECATED = KOTLIN_1_2
|
||||
|
||||
@JvmField
|
||||
val FIRST_SUPPORTED = KOTLIN_1_3
|
||||
|
||||
@JvmField
|
||||
val LATEST_STABLE = KOTLIN_1_4
|
||||
|
||||
Reference in New Issue
Block a user