Remove unsupported versions from kotlin compiler tab in settings

KT-36146 In progress
This commit is contained in:
Pavel Kirpichenkov
2020-01-29 15:07:35 +03:00
parent 913ed71863
commit 9902643a26
8 changed files with 34 additions and 32 deletions
@@ -249,7 +249,7 @@ enum class LanguageVersion(val major: Int, val minor: Int) : DescriptionAware {
get() = this <= LATEST_STABLE
val isDeprecated: Boolean
get() = this >= OLDEST_DEPRECATED && this < FIRST_SUPPORTED
get() = OLDEST_DEPRECATED <= this && this < FIRST_SUPPORTED
val isUnsupported: Boolean
get() = this < OLDEST_DEPRECATED
@@ -258,7 +258,12 @@ enum class LanguageVersion(val major: Int, val minor: Int) : DescriptionAware {
get() = "$major.$minor"
override val description: String
get() = if (isStable) versionString else "$versionString (EXPERIMENTAL)"
get() = when {
!isStable -> "$versionString (EXPERIMENTAL)"
isDeprecated -> "$versionString (DEPRECATED)"
isUnsupported -> "$versionString (UNSUPPORTED)"
else -> versionString
}
override fun toString() = versionString