[FIR] rename requiredPhase to requiredMembersPhase for type scope

Also move `requiredMembersPhase` use inside `unsubstitutedScope`

^KT-56551
This commit is contained in:
Dmitrii Gridin
2023-05-14 17:31:44 +02:00
committed by Space Team
parent 52ce302095
commit aaf173687b
18 changed files with 193 additions and 125 deletions
@@ -279,7 +279,7 @@ internal class KtFirScopeProvider(
firResolveSession.useSiteFirSession,
getScopeSession(),
FakeOverrideTypeCalculator.Forced,
requiredPhase = FirResolvePhase.STATUS,
requiredMembersPhase = FirResolvePhase.STATUS,
)
}
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -234,8 +234,9 @@ internal object FirReferenceResolveHelper {
session,
analysisSession.getScopeSessionFor(analysisSession.useSiteSession),
FakeOverrideTypeCalculator.DoNothing,
requiredPhase = FirResolvePhase.STATUS
requiredMembersPhase = FirResolvePhase.STATUS,
) ?: return emptyList()
return buildList {
scope.processFunctionsByName(OperatorNameConventions.EQUALS) { functionSymbol ->
val parameterSymbol = functionSymbol.valueParameterSymbols.singleOrNull()
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -56,8 +56,9 @@ internal class KtFirPropertySetterSymbol(
session,
analysisSession.getScopeSessionFor(session),
FakeOverrideTypeCalculator.DoNothing,
requiredPhase = FirResolvePhase.STATUS,
requiredMembersPhase = FirResolvePhase.STATUS,
) ?: return false
val overriddenProperties = containingClassScope.getDirectOverriddenProperties(propertySymbol)
overriddenProperties.any { it.isVar }
}