From 7f58162abc91fc65f57c8139f90d9a17366c972c Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Tue, 5 Nov 2019 11:06:25 +0300 Subject: [PATCH] Add `-Xuse-mixed-named-arguments` compiler flag That flags enables MixedNamedArgumentsInTheirOwnPosition feature (see #KT-7745) without experimental warning --- .../cli/common/arguments/CommonCompilerArguments.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt index f6bc89d0ddb..1fa73fe5451 100644 --- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt +++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt @@ -307,6 +307,12 @@ abstract class CommonCompilerArguments : CommonToolArguments() { ) var useFir: Boolean by FreezableVar(false) + @Argument( + value = "-Xuse-mixed-named-arguments", + description = "Enable Support named arguments in their own position even if the result appears as mixed" + ) + val useMixedNamedArguments: Boolean by FreezableVar(false) + @Argument(value = "-Xdisable-default-scripting-plugin", description = "Do not enable scripting plugin by default") var disableDefaultScriptingPlugin: Boolean by FreezableVar(false) @@ -369,6 +375,10 @@ abstract class CommonCompilerArguments : CommonToolArguments() { put(LanguageFeature.ProperIeee754Comparisons, LanguageFeature.State.ENABLED) } + if (useMixedNamedArguments) { + put(LanguageFeature.MixedNamedArgumentsInTheirOwnPosition, LanguageFeature.State.ENABLED) + } + if (progressiveMode) { LanguageFeature.values().filter { it.kind.enabledInProgressiveMode }.forEach { // Don't overwrite other settings: users may want to turn off some particular