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 79c0e60114c..b551ce52bd7 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 @@ -530,7 +530,10 @@ abstract class CommonCompilerArguments : CommonToolArguments() { } } - if (allowAnyScriptsInSourceRoots) { + if (useK2) { + // TODO: remove when K2 compilation will mean LV 2.0 + put(LanguageFeature.SkipStandaloneScriptsInSourceRoots, LanguageFeature.State.ENABLED) + } else if (allowAnyScriptsInSourceRoots) { put(LanguageFeature.SkipStandaloneScriptsInSourceRoots, LanguageFeature.State.DISABLED) }