Make it possible to enable "non-local break and continue" with -language-version flag

We initially wanted to release the feature in 1.9.0, but found a bug in
K1 KT-54906. It was decided to postpone the feature release to 2.1, but
at this time KOTLIN_2_1 didn't exist

In this commit I make it possible to enable the feature with
-language-version 2.1 flag, so users can "preview" this feature in 2.0

KT-1436
This commit is contained in:
Nikita Bobko
2024-01-10 08:53:11 +01:00
committed by Space Team
parent eabbe21b66
commit 96b2f13397
@@ -318,6 +318,7 @@ enum class LanguageFeature(
ProhibitSingleNamedFunctionAsExpression(KOTLIN_2_1, kind = BUG_FIX), // KT-62573
ForbidLambdaParameterWithMissingDependencyType(KOTLIN_2_1, kind = BUG_FIX), // KT-64266
JsAllowInvalidCharsIdentifiersEscaping(KOTLIN_2_1, kind = OTHER), // KT-31799
BreakContinueInInlineLambdas(KOTLIN_2_1), // KT-1436
// End of 2.* language features --------------------------------------------------
@@ -351,7 +352,6 @@ enum class LanguageFeature(
// Experimental features
BreakContinueInInlineLambdas(null), // KT-1436
LightweightLambdas(null),
JsEnableExtensionFunctionInExternals(null, kind = OTHER),
PackagePrivateFileClassesWithAllPrivateMembers(null), // Disabled until the breaking change is approved by the committee, see KT-10884.