FIR: Rework overridden members processing in FirTypeScope
Now, FirTypeScope returns only direct overridden and a base scope where a client might look for deeper overridden It's necessary to make the API fast and simple when only direct overridden are needed At the same time, while this API looks a bit complicated for most of the clients there are simple extension helpers that obtain just the direct or all overridden
This commit is contained in:
+11
-10
@@ -85,20 +85,21 @@ class JavaClassMembersEnhancementScope(
|
||||
}
|
||||
}
|
||||
|
||||
override fun processOverriddenFunctionsWithDepth(
|
||||
override fun processDirectOverriddenFunctionsWithBaseScope(
|
||||
functionSymbol: FirFunctionSymbol<*>,
|
||||
processor: (FirFunctionSymbol<*>, Int) -> ProcessorAction
|
||||
): ProcessorAction = doProcessOverriddenCallables(
|
||||
functionSymbol, processor, overriddenFunctions, useSiteMemberScope,
|
||||
FirTypeScope::processOverriddenFunctionsWithDepth
|
||||
)
|
||||
processor: (FirFunctionSymbol<*>, FirTypeScope) -> ProcessorAction
|
||||
): ProcessorAction =
|
||||
doProcessDirectOverriddenCallables(
|
||||
functionSymbol, processor, overriddenFunctions, useSiteMemberScope,
|
||||
FirTypeScope::processDirectOverriddenFunctionsWithBaseScope
|
||||
)
|
||||
|
||||
override fun processOverriddenPropertiesWithDepth(
|
||||
override fun processDirectOverriddenPropertiesWithBaseScope(
|
||||
propertySymbol: FirPropertySymbol,
|
||||
processor: (FirPropertySymbol, Int) -> ProcessorAction
|
||||
): ProcessorAction = doProcessOverriddenCallables(
|
||||
processor: (FirPropertySymbol, FirTypeScope) -> ProcessorAction
|
||||
): ProcessorAction = doProcessDirectOverriddenCallables(
|
||||
propertySymbol, processor, overriddenProperties, useSiteMemberScope,
|
||||
FirTypeScope::processOverriddenPropertiesWithDepth
|
||||
FirTypeScope::processDirectOverriddenPropertiesWithBaseScope
|
||||
)
|
||||
|
||||
override fun getCallableNames(): Set<Name> {
|
||||
|
||||
Reference in New Issue
Block a user