[K1] Rename analysis flag expectActualLinker

Rename analysis flag `expectActualLinker` to `skipExpectedActualDeclarationChecker`
to better reflect its semantics. This flag isn't used on IDE plugin side, so no
additional changes in `intellij` repo are needed.

^KT-61136
This commit is contained in:
Dmitriy Dolovov
2023-09-13 18:24:41 +02:00
committed by Space Team
parent 1af7649ee9
commit 98b3bdb175
3 changed files with 3 additions and 3 deletions
@@ -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(
@@ -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
@@ -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)