From a8c23e1c3a02886fe9486651cc3ba9a1a1082906 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Tue, 16 Feb 2021 12:30:26 +0300 Subject: [PATCH] FirDefaultStarImportingScope: filter INVISIBLE_CLASSES properly --- .../kotlin/fir/scopes/impl/FirDefaultStarImportingScope.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirDefaultStarImportingScope.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirDefaultStarImportingScope.kt index 98560e9ad6e..2b97b05bd05 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirDefaultStarImportingScope.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirDefaultStarImportingScope.kt @@ -39,6 +39,7 @@ class FirDefaultStarImportingScope( } override fun processFunctionsByName(name: Name, processor: (FirNamedFunctionSymbol) -> Unit) { + if (filter == FirImportingScopeFilter.INVISIBLE_CLASSES) return if (name.isSpecial || name.identifier.isNotEmpty()) { for (import in starImports) { for (symbol in provider.getTopLevelFunctionSymbols(import.packageFqName, name)) { @@ -49,6 +50,7 @@ class FirDefaultStarImportingScope( } override fun processPropertiesByName(name: Name, processor: (FirVariableSymbol<*>) -> Unit) { + if (filter == FirImportingScopeFilter.INVISIBLE_CLASSES) return if (name.isSpecial || name.identifier.isNotEmpty()) { for (import in starImports) { for (symbol in provider.getTopLevelPropertySymbols(import.packageFqName, name)) {