From 96b2f13397dc5430e5d44544661cb1dbba923c18 Mon Sep 17 00:00:00 2001 From: Nikita Bobko Date: Wed, 10 Jan 2024 08:53:11 +0100 Subject: [PATCH] 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 --- .../src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/util/src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt b/compiler/util/src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt index 81be54d061e..de09a399014 100644 --- a/compiler/util/src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt +++ b/compiler/util/src/org/jetbrains/kotlin/config/LanguageVersionSettings.kt @@ -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.