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 77723b3a865..7cf50cd757e 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 @@ -807,7 +807,7 @@ abstract class CommonCompilerArguments : CommonToolArguments() { ) } put(AnalysisFlags.optIn, useExperimentalFqNames + optIn?.toList().orEmpty()) - put(AnalysisFlags.expectActualLinker, expectActualLinker) + put(AnalysisFlags.skipExpectedActualDeclarationChecker, expectActualLinker) put(AnalysisFlags.explicitApiVersion, apiVersion != null) put(AnalysisFlags.allowResultReturnType, allowResultReturnType) ExplicitApiMode.fromString(explicitApi)?.also { put(AnalysisFlags.explicitApiMode, it) } ?: collector.report( diff --git a/compiler/config/src/org/jetbrains/kotlin/config/AnalysisFlags.kt b/compiler/config/src/org/jetbrains/kotlin/config/AnalysisFlags.kt index cf0f1b1d458..bc23e47f7e1 100644 --- a/compiler/config/src/org/jetbrains/kotlin/config/AnalysisFlags.kt +++ b/compiler/config/src/org/jetbrains/kotlin/config/AnalysisFlags.kt @@ -19,7 +19,7 @@ object AnalysisFlags { val multiPlatformDoNotCheckActual by AnalysisFlag.Delegates.Boolean @JvmStatic - val expectActualLinker by AnalysisFlag.Delegates.Boolean + val skipExpectedActualDeclarationChecker by AnalysisFlag.Delegates.Boolean @JvmStatic val optIn by AnalysisFlag.Delegates.ListOfStrings diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/ExpectedActualDeclarationChecker.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/ExpectedActualDeclarationChecker.kt index 6d28f6a6476..4d9058b6684 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/ExpectedActualDeclarationChecker.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/ExpectedActualDeclarationChecker.kt @@ -55,7 +55,7 @@ class ExpectedActualDeclarationChecker( override fun check(declaration: KtDeclaration, descriptor: DeclarationDescriptor, context: DeclarationCheckerContext) { if (!context.languageVersionSettings.supportsFeature(LanguageFeature.MultiPlatformProjects)) return // TODO: we need a klib based MPP aware ModuleStructureOracle. Just disable the checks for now. - if (context.languageVersionSettings.getFlag(AnalysisFlags.expectActualLinker)) return + if (context.languageVersionSettings.getFlag(AnalysisFlags.skipExpectedActualDeclarationChecker)) return // Note that this check is necessary, because for default accessors KtProperty is passed for KtDeclaration, so this // case won't be covered by the next check (also, it accidentally fixes KT-28385)