diff --git a/analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KtFirScopeProvider.kt b/analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KtFirScopeProvider.kt index d24691ecfa3..d33ad353866 100644 --- a/analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KtFirScopeProvider.kt +++ b/analysis/analysis-api-fir/src/org/jetbrains/kotlin/analysis/api/fir/components/KtFirScopeProvider.kt @@ -329,38 +329,14 @@ internal class KtFirScopeProvider( private class FirTypeScopeWithSyntheticProperties( val typeScope: FirTypeScope, val syntheticPropertiesScope: FirSyntheticPropertiesScope, -) : FirTypeScope() { +) : FirDelegatingTypeScope(typeScope) { override fun getCallableNames(): Set = typeScope.getCallableNames() + syntheticPropertiesScope.getCallableNames() - override fun getClassifierNames(): Set = typeScope.getClassifierNames() override fun mayContainName(name: Name): Boolean = typeScope.mayContainName(name) || syntheticPropertiesScope.mayContainName(name) - override val scopeOwnerLookupNames: List get() = typeScope.scopeOwnerLookupNames - - override fun processDirectOverriddenFunctionsWithBaseScope( - functionSymbol: FirNamedFunctionSymbol, - processor: (FirNamedFunctionSymbol, FirTypeScope) -> ProcessorAction, - ): ProcessorAction = typeScope.processDirectOverriddenFunctionsWithBaseScope(functionSymbol, processor) - - override fun processDirectOverriddenPropertiesWithBaseScope( - propertySymbol: FirPropertySymbol, - processor: (FirPropertySymbol, FirTypeScope) -> ProcessorAction, - ): ProcessorAction = typeScope.processDirectOverriddenPropertiesWithBaseScope(propertySymbol, processor) - - override fun processClassifiersByNameWithSubstitution(name: Name, processor: (FirClassifierSymbol<*>, ConeSubstitutor) -> Unit) { - typeScope.processClassifiersByNameWithSubstitution(name, processor) - } - - override fun processFunctionsByName(name: Name, processor: (FirNamedFunctionSymbol) -> Unit) { - typeScope.processFunctionsByName(name, processor) - } override fun processPropertiesByName(name: Name, processor: (FirVariableSymbol<*>) -> Unit) { typeScope.processPropertiesByName(name, processor) syntheticPropertiesScope.processPropertiesByName(name, processor) } - - override fun processDeclaredConstructors(processor: (FirConstructorSymbol) -> Unit) { - typeScope.processDeclaredConstructors(processor) - } } private class EnumEntryContainingNamesAwareScope(private val originalScope: FirContainingNamesAwareScope) : FirContainingNamesAwareScope() { diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaAnnotationSyntheticPropertiesScope.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaAnnotationSyntheticPropertiesScope.kt index 08dc1e7d261..0ccc0689d50 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaAnnotationSyntheticPropertiesScope.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaAnnotationSyntheticPropertiesScope.kt @@ -13,7 +13,6 @@ import org.jetbrains.kotlin.fir.declarations.synthetic.FirSyntheticProperty import org.jetbrains.kotlin.fir.declarations.synthetic.FirSyntheticPropertyAccessor import org.jetbrains.kotlin.fir.java.symbols.FirJavaOverriddenSyntheticPropertySymbol import org.jetbrains.kotlin.fir.nullableModuleData -import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor import org.jetbrains.kotlin.fir.scopes.FirTypeScope import org.jetbrains.kotlin.fir.scopes.ProcessorAction import org.jetbrains.kotlin.fir.symbols.impl.* @@ -21,23 +20,20 @@ import org.jetbrains.kotlin.name.CallableId import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.fir.declarations.resolvePhase +import org.jetbrains.kotlin.fir.scopes.FirDelegatingTypeScope class JavaAnnotationSyntheticPropertiesScope( private val session: FirSession, owner: FirRegularClassSymbol, private val delegateScope: JavaClassMembersEnhancementScope -) : FirTypeScope() { +) : FirDelegatingTypeScope(delegateScope) { private val classId: ClassId = owner.classId private val names: Set = owner.fir.declarations.mapNotNullTo(mutableSetOf()) { (it as? FirSimpleFunction)?.name } private val syntheticPropertiesCache = mutableMapOf>() - override fun processDeclaredConstructors(processor: (FirConstructorSymbol) -> Unit) { - delegateScope.processDeclaredConstructors(processor) - } - override fun processFunctionsByName(name: Name, processor: (FirNamedFunctionSymbol) -> Unit) { if (name in names) return - delegateScope.processFunctionsByName(name, processor) + super.processFunctionsByName(name, processor) } override fun processPropertiesByName(name: Name, processor: (FirVariableSymbol<*>) -> Unit) { @@ -63,10 +59,6 @@ class JavaAnnotationSyntheticPropertiesScope( } } - override fun processClassifiersByNameWithSubstitution(name: Name, processor: (FirClassifierSymbol<*>, ConeSubstitutor) -> Unit) { - delegateScope.processClassifiersByNameWithSubstitution(name, processor) - } - override fun processDirectOverriddenFunctionsWithBaseScope( functionSymbol: FirNamedFunctionSymbol, processor: (FirNamedFunctionSymbol, FirTypeScope) -> ProcessorAction @@ -81,14 +73,6 @@ class JavaAnnotationSyntheticPropertiesScope( return ProcessorAction.NONE } - override fun getCallableNames(): Set { - return delegateScope.getCallableNames() - } - - override fun getClassifierNames(): Set { - return delegateScope.getClassifierNames() - } - override fun toString(): String { return "Java annotation synthetic properties scope for $classId" } diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaClassMembersEnhancementScope.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaClassMembersEnhancementScope.kt index f76b59557b7..0e245627f53 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaClassMembersEnhancementScope.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaClassMembersEnhancementScope.kt @@ -11,7 +11,7 @@ import org.jetbrains.kotlin.fir.declarations.FirDeclarationOrigin import org.jetbrains.kotlin.fir.declarations.FirSimpleFunction import org.jetbrains.kotlin.fir.initialSignatureAttr import org.jetbrains.kotlin.fir.java.enhancement.FirSignatureEnhancement -import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor +import org.jetbrains.kotlin.fir.scopes.FirDelegatingTypeScope import org.jetbrains.kotlin.fir.scopes.FirTypeScope import org.jetbrains.kotlin.fir.scopes.ProcessorAction import org.jetbrains.kotlin.fir.scopes.getDirectOverriddenMembers @@ -23,7 +23,7 @@ class JavaClassMembersEnhancementScope( session: FirSession, private val owner: FirRegularClassSymbol, private val useSiteMemberScope: JavaClassUseSiteMemberScope, -) : FirTypeScope() { +) : FirDelegatingTypeScope(useSiteMemberScope) { private val enhancedToOriginalFunctions = mutableMapOf() private val enhancedToOriginalProperties = mutableMapOf() @@ -40,8 +40,6 @@ class JavaClassMembersEnhancementScope( processor(enhancedPropertySymbol) } - - return super.processPropertiesByName(name, processor) } override fun processFunctionsByName(name: Name, processor: (FirNamedFunctionSymbol) -> Unit) { @@ -55,8 +53,6 @@ class JavaClassMembersEnhancementScope( processor(enhancedFunctionSymbol) } } - - return super.processFunctionsByName(name, processor) } private fun FirCallableDeclaration.overriddenMembers(): List { @@ -67,10 +63,6 @@ class JavaClassMembersEnhancementScope( }.map { it.fir } } - override fun processClassifiersByNameWithSubstitution(name: Name, processor: (FirClassifierSymbol<*>, ConeSubstitutor) -> Unit) { - useSiteMemberScope.processClassifiersByNameWithSubstitution(name, processor) - } - override fun processDeclaredConstructors(processor: (FirConstructorSymbol) -> Unit) { useSiteMemberScope.processDeclaredConstructors process@{ original -> val function = signatureEnhancement.enhancedFunction(original, name = null) @@ -109,18 +101,6 @@ class JavaClassMembersEnhancementScope( return useSiteMemberScope.processDirectOverriddenCallables(original, processor) } - override fun getCallableNames(): Set { - return useSiteMemberScope.getCallableNames() - } - - override fun getClassifierNames(): Set { - return useSiteMemberScope.getClassifierNames() - } - - override fun mayContainName(name: Name): Boolean { - return useSiteMemberScope.mayContainName(name) - } - override fun toString(): String { return "Java enhancement scope for ${owner.classId}" } diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaClassStaticEnhancementScope.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaClassStaticEnhancementScope.kt index b6c35f01487..79c07268115 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaClassStaticEnhancementScope.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/scopes/JavaClassStaticEnhancementScope.kt @@ -7,8 +7,7 @@ package org.jetbrains.kotlin.fir.java.scopes import org.jetbrains.kotlin.fir.FirSession import org.jetbrains.kotlin.fir.java.enhancement.FirSignatureEnhancement -import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor -import org.jetbrains.kotlin.fir.scopes.FirContainingNamesAwareScope +import org.jetbrains.kotlin.fir.scopes.FirDelegatingContainingNamesAwareScope import org.jetbrains.kotlin.fir.symbols.impl.* import org.jetbrains.kotlin.name.Name @@ -16,7 +15,7 @@ class JavaClassStaticEnhancementScope( session: FirSession, owner: FirRegularClassSymbol, private val useSiteStaticScope: JavaClassStaticUseSiteScope, -) : FirContainingNamesAwareScope() { +) : FirDelegatingContainingNamesAwareScope(useSiteStaticScope) { private val signatureEnhancement = FirSignatureEnhancement(owner.fir, session) { emptyList() } @@ -25,8 +24,6 @@ class JavaClassStaticEnhancementScope( useSiteStaticScope.processPropertiesByName(name) process@{ original -> processor(signatureEnhancement.enhancedProperty(original, name)) } - - return super.processPropertiesByName(name, processor) } override fun processFunctionsByName(name: Name, processor: (FirNamedFunctionSymbol) -> Unit) { @@ -36,12 +33,6 @@ class JavaClassStaticEnhancementScope( processor(enhancedFunction) } } - - return super.processFunctionsByName(name, processor) - } - - override fun processClassifiersByNameWithSubstitution(name: Name, processor: (FirClassifierSymbol<*>, ConeSubstitutor) -> Unit) { - useSiteStaticScope.processClassifiersByNameWithSubstitution(name, processor) } override fun processDeclaredConstructors(processor: (FirConstructorSymbol) -> Unit) { @@ -50,17 +41,4 @@ class JavaClassStaticEnhancementScope( processor(function as FirConstructorSymbol) } } - - override fun getCallableNames(): Set { - return useSiteStaticScope.getCallableNames() - } - - override fun getClassifierNames(): Set { - return useSiteStaticScope.getClassifierNames() - } - - - override fun mayContainName(name: Name): Boolean { - return useSiteStaticScope.mayContainName(name) - } } diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirNestedClassifierScopeWithSubstitution.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirNestedClassifierScopeWithSubstitution.kt index 739aebeac1a..eb4750308e9 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirNestedClassifierScopeWithSubstitution.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirNestedClassifierScopeWithSubstitution.kt @@ -10,6 +10,7 @@ import org.jetbrains.kotlin.fir.declarations.utils.isInner import org.jetbrains.kotlin.fir.resolve.createSubstitutionForSupertype import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor import org.jetbrains.kotlin.fir.scopes.FirContainingNamesAwareScope +import org.jetbrains.kotlin.fir.scopes.FirDelegatingContainingNamesAwareScope import org.jetbrains.kotlin.fir.scopes.getSingleClassifier import org.jetbrains.kotlin.fir.symbols.impl.* import org.jetbrains.kotlin.fir.types.ConeClassLikeType @@ -18,35 +19,12 @@ import org.jetbrains.kotlin.name.Name class FirNestedClassifierScopeWithSubstitution internal constructor( val originalScope: FirContainingNamesAwareScope, private val substitutor: ConeSubstitutor -) : FirContainingNamesAwareScope() { - - override fun processFunctionsByName(name: Name, processor: (FirNamedFunctionSymbol) -> Unit) { - originalScope.processFunctionsByName(name, processor) - } - - override fun processPropertiesByName(name: Name, processor: (FirVariableSymbol<*>) -> Unit) { - originalScope.processPropertiesByName(name, processor) - } - - override fun processDeclaredConstructors(processor: (FirConstructorSymbol) -> Unit) { - originalScope.processDeclaredConstructors(processor) - } - - override fun mayContainName(name: Name): Boolean { - return originalScope.mayContainName(name) - } - +) : FirDelegatingContainingNamesAwareScope(originalScope) { override fun processClassifiersByNameWithSubstitution(name: Name, processor: (FirClassifierSymbol<*>, ConeSubstitutor) -> Unit) { val matchedClass = originalScope.getSingleClassifier(name) as? FirRegularClassSymbol ?: return val substitutor = substitutor.takeIf { matchedClass.fir.isInner } ?: ConeSubstitutor.Empty processor(matchedClass, substitutor) } - - override fun getCallableNames(): Set = originalScope.getCallableNames() - override fun getClassifierNames(): Set = originalScope.getClassifierNames() - - override val scopeOwnerLookupNames: List - get() = originalScope.scopeOwnerLookupNames } fun FirContainingNamesAwareScope.wrapNestedClassifierScopeWithSubstitutionForSuperType( diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirOnlyCallablesScope.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirOnlyCallablesScope.kt index 75da726bd3f..49cf76678b5 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirOnlyCallablesScope.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirOnlyCallablesScope.kt @@ -25,6 +25,9 @@ class FirOnlyCallablesScope(val delegate: FirScope) : FirScope() { } class FirNameAwareOnlyCallablesScope(val delegate: FirContainingNamesAwareScope) : FirContainingNamesAwareScope() { + // We want to *avoid* delegation to certain scope functions, so we delegate explicitly instead of using + // `FirDelegatingContainingNamesAwareScope`. + override fun processFunctionsByName(name: Name, processor: (FirNamedFunctionSymbol) -> Unit) { return delegate.processFunctionsByName(name, processor) } diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirScopeWithFakeOverrideTypeCalculator.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirScopeWithFakeOverrideTypeCalculator.kt index de43ca6b5dd..86ffe8d2a50 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirScopeWithFakeOverrideTypeCalculator.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirScopeWithFakeOverrideTypeCalculator.kt @@ -8,8 +8,8 @@ package org.jetbrains.kotlin.fir.scopes.impl import org.jetbrains.kotlin.fir.declarations.FirCallableDeclaration import org.jetbrains.kotlin.fir.isIntersectionOverride import org.jetbrains.kotlin.fir.isSubstitutionOverride -import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor import org.jetbrains.kotlin.fir.scopes.FakeOverrideTypeCalculator +import org.jetbrains.kotlin.fir.scopes.FirDelegatingTypeScope import org.jetbrains.kotlin.fir.scopes.FirTypeScope import org.jetbrains.kotlin.fir.scopes.ProcessorAction import org.jetbrains.kotlin.fir.symbols.impl.* @@ -18,11 +18,7 @@ import org.jetbrains.kotlin.name.Name class FirScopeWithFakeOverrideTypeCalculator( private val delegate: FirTypeScope, private val fakeOverrideTypeCalculator: FakeOverrideTypeCalculator -) : FirTypeScope() { - override fun processClassifiersByNameWithSubstitution(name: Name, processor: (FirClassifierSymbol<*>, ConeSubstitutor) -> Unit) { - delegate.processClassifiersByNameWithSubstitution(name, processor) - } - +) : FirDelegatingTypeScope(delegate) { override fun processFunctionsByName(name: Name, processor: (FirNamedFunctionSymbol) -> Unit) { delegate.processFunctionsByName(name) { updateReturnType(it.fir) @@ -37,14 +33,6 @@ class FirScopeWithFakeOverrideTypeCalculator( } } - override fun processDeclaredConstructors(processor: (FirConstructorSymbol) -> Unit) { - delegate.processDeclaredConstructors(processor) - } - - override fun mayContainName(name: Name): Boolean { - return delegate.mayContainName(name) - } - override fun processDirectOverriddenFunctionsWithBaseScope( functionSymbol: FirNamedFunctionSymbol, processor: (FirNamedFunctionSymbol, FirTypeScope) -> ProcessorAction @@ -65,23 +53,12 @@ class FirScopeWithFakeOverrideTypeCalculator( } } - override fun getCallableNames(): Set { - return delegate.getCallableNames() - } - - override fun getClassifierNames(): Set { - return delegate.getClassifierNames() - } - private fun updateReturnType(declaration: FirCallableDeclaration) { if (declaration.isSubstitutionOverride || declaration.isIntersectionOverride) { fakeOverrideTypeCalculator.computeReturnType(declaration) } } - override val scopeOwnerLookupNames: List - get() = delegate.scopeOwnerLookupNames - override fun toString(): String { return delegate.toString() } diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirStaticScope.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirStaticScope.kt index c98f31397c4..f0afba63477 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirStaticScope.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/scopes/impl/FirStaticScope.kt @@ -14,6 +14,9 @@ import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol import org.jetbrains.kotlin.name.Name class FirStaticScope(private val delegateScope: FirContainingNamesAwareScope) : FirContainingNamesAwareScope() { + // We want to *avoid* delegation to certain scope functions, so we delegate explicitly instead of using + // `FirDelegatingContainingNamesAwareScope`. + override fun processClassifiersByNameWithSubstitution(name: Name, processor: (FirClassifierSymbol<*>, ConeSubstitutor) -> Unit) { delegateScope.processClassifiersByNameWithSubstitution(name, processor) } diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/scopes/FirDelegatingContainingNamesAwareScope.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/scopes/FirDelegatingContainingNamesAwareScope.kt new file mode 100644 index 00000000000..13e8f6810c6 --- /dev/null +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/scopes/FirDelegatingContainingNamesAwareScope.kt @@ -0,0 +1,104 @@ +/* + * 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. + */ + +package org.jetbrains.kotlin.fir.scopes + +import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor +import org.jetbrains.kotlin.fir.symbols.impl.FirClassifierSymbol +import org.jetbrains.kotlin.fir.symbols.impl.FirConstructorSymbol +import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol +import org.jetbrains.kotlin.fir.symbols.impl.FirPropertySymbol +import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol +import org.jetbrains.kotlin.name.Name + +/** + * A utility [FirContainingNamesAwareScope] which delegates to [delegate] by default for the purpose of reducing boilerplate code. + * Inheritors must override at least some functions, or else [delegate] could be used directly. + * + * [toString] is not delegated by default because the [delegate] is usually not the same kind of scope as this delegating scope. + */ +abstract class FirDelegatingContainingNamesAwareScope(private val delegate: FirContainingNamesAwareScope) : FirContainingNamesAwareScope() { + override fun getCallableNames(): Set = delegate.getCallableNames() + override fun getClassifierNames(): Set = delegate.getClassifierNames() + override fun mayContainName(name: Name): Boolean = delegate.mayContainName(name) + override val scopeOwnerLookupNames: List get() = delegate.scopeOwnerLookupNames + + override fun processClassifiersByNameWithSubstitution( + name: Name, + processor: (FirClassifierSymbol<*>, ConeSubstitutor) -> Unit, + ) { + delegate.processClassifiersByNameWithSubstitution(name, processor) + } + + override fun processFunctionsByName( + name: Name, + processor: (FirNamedFunctionSymbol) -> Unit, + ) { + delegate.processFunctionsByName(name, processor) + } + + override fun processPropertiesByName( + name: Name, + processor: (FirVariableSymbol<*>) -> Unit, + ) { + delegate.processPropertiesByName(name, processor) + } + + override fun processDeclaredConstructors(processor: (FirConstructorSymbol) -> Unit) { + delegate.processDeclaredConstructors(processor) + } +} + +/** + * A utility [FirTypeScope] which delegates to [delegate] by default for the purpose of reducing boilerplate code. Inheritors must override + * at least some functions, or else [delegate] could be used directly. + * + * [toString] is not delegated by default because the [delegate] is usually not the same kind of scope as this delegating scope. + */ +abstract class FirDelegatingTypeScope(private val delegate: FirTypeScope) : FirTypeScope() { + override fun getCallableNames(): Set = delegate.getCallableNames() + override fun getClassifierNames(): Set = delegate.getClassifierNames() + override fun mayContainName(name: Name): Boolean = delegate.mayContainName(name) + override val scopeOwnerLookupNames: List get() = delegate.scopeOwnerLookupNames + + override fun processClassifiersByNameWithSubstitution( + name: Name, + processor: (FirClassifierSymbol<*>, ConeSubstitutor) -> Unit, + ) { + delegate.processClassifiersByNameWithSubstitution(name, processor) + } + + override fun processFunctionsByName( + name: Name, + processor: (FirNamedFunctionSymbol) -> Unit, + ) { + delegate.processFunctionsByName(name, processor) + } + + override fun processPropertiesByName( + name: Name, + processor: (FirVariableSymbol<*>) -> Unit, + ) { + delegate.processPropertiesByName(name, processor) + } + + override fun processDeclaredConstructors(processor: (FirConstructorSymbol) -> Unit) { + delegate.processDeclaredConstructors(processor) + } + + override fun processDirectOverriddenFunctionsWithBaseScope( + functionSymbol: FirNamedFunctionSymbol, + processor: (FirNamedFunctionSymbol, FirTypeScope) -> ProcessorAction, + ): ProcessorAction { + return delegate.processDirectOverriddenFunctionsWithBaseScope(functionSymbol, processor) + } + + override fun processDirectOverriddenPropertiesWithBaseScope( + propertySymbol: FirPropertySymbol, + processor: (FirPropertySymbol, FirTypeScope) -> ProcessorAction, + ): ProcessorAction { + return delegate.processDirectOverriddenPropertiesWithBaseScope(propertySymbol, processor) + } +}