Introduce language version 2.1

This commit is contained in:
Ivan Kylchik
2023-03-15 13:03:14 +01:00
committed by Space Team
parent 668dfdd81d
commit 6bce668cac
10 changed files with 16 additions and 6 deletions
@@ -66,6 +66,9 @@ class ApiVersion private constructor(
@JvmField
val KOTLIN_2_0 = createByLanguageVersion(LanguageVersion.KOTLIN_2_0)
@JvmField
val KOTLIN_2_1 = createByLanguageVersion(LanguageVersion.KOTLIN_2_1)
@JvmField
val LATEST: ApiVersion = createByLanguageVersion(LanguageVersion.values().last())
@@ -288,6 +288,8 @@ enum class LanguageFeature(
ForbidInferringPostponedTypeVariableIntoDeclaredUpperBound(KOTLIN_2_0, kind = BUG_FIX), // KT-47986
ProhibitUseSiteGetTargetAnnotations(KOTLIN_2_0, kind = BUG_FIX), // KT-15470
// 2.1
// End of 2.* language features --------------------------------------------------
// This feature effectively might be removed because we decided to disable it until K2 and there it will be unconditionally enabled.
@@ -426,6 +428,7 @@ enum class LanguageVersion(val major: Int, val minor: Int) : DescriptionAware, L
KOTLIN_1_9(1, 9),
KOTLIN_2_0(2, 0),
KOTLIN_2_1(2, 1),
;
override val isStable: Boolean