From a156cca02a57e9873af029078b83527b1f36674c Mon Sep 17 00:00:00 2001 From: Ilya Kirillov Date: Mon, 24 Aug 2020 12:04:25 +0300 Subject: [PATCH] FIR: make class FirObjectImportedCallableScope to be name aware --- .../fir/scopes/impl/FirObjectImportedCallableScope.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirObjectImportedCallableScope.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirObjectImportedCallableScope.kt index 0fd1c23f44e..090981949c0 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirObjectImportedCallableScope.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirObjectImportedCallableScope.kt @@ -8,7 +8,9 @@ package org.jetbrains.kotlin.fir.scopes.impl import org.jetbrains.kotlin.fir.declarations.FirDeclarationOrigin import org.jetbrains.kotlin.fir.declarations.builder.buildProperty import org.jetbrains.kotlin.fir.declarations.builder.buildSimpleFunction +import org.jetbrains.kotlin.fir.scopes.FirContainingNamesAwareScope import org.jetbrains.kotlin.fir.scopes.FirScope +import org.jetbrains.kotlin.fir.scopes.FirTypeScope import org.jetbrains.kotlin.fir.symbols.CallableId import org.jetbrains.kotlin.fir.symbols.impl.FirFunctionSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol @@ -19,8 +21,8 @@ import org.jetbrains.kotlin.name.Name class FirObjectImportedCallableScope( private val importedClassId: ClassId, - private val objectUseSiteScope: FirScope -) : FirScope() { + private val objectUseSiteScope: FirTypeScope +) : FirScope(), FirContainingNamesAwareScope { override fun processFunctionsByName(name: Name, processor: (FirFunctionSymbol<*>) -> Unit) { objectUseSiteScope.processFunctionsByName(name) wrapper@{ symbol -> if (symbol !is FirNamedFunctionSymbol) { @@ -71,4 +73,8 @@ class FirObjectImportedCallableScope( processor(syntheticFunction.symbol) } } + + override fun getCallableNames(): Set = objectUseSiteScope.getCallableNames() + + override fun getClassifierNames(): Set = emptySet() } \ No newline at end of file