AA: use nameFilter of KtFileScope#get*Symbols

This commit is contained in:
Jinseong Jeon
2023-05-06 23:15:38 -07:00
committed by Ilya Kirillov
parent f87fdb43fa
commit b42d2e56a4
2 changed files with 6 additions and 7 deletions
@@ -44,7 +44,7 @@ internal class KtFe10FileScope(
for (declaration in ktFile.declarations) {
if (declaration is KtCallableDeclaration) {
val descriptor = context[BindingContext.DECLARATION_TO_DESCRIPTOR, declaration] as? CallableDescriptor ?: continue
val ktSymbol = descriptor.toKtCallableSymbol(analysisContext) ?: continue
val ktSymbol = descriptor.takeIf { nameFilter(it.name) }?.toKtCallableSymbol(analysisContext) ?: continue
yield(ktSymbol)
}
}
@@ -58,7 +58,7 @@ internal class KtFe10FileScope(
for (declaration in ktFile.declarations) {
if (declaration is KtClassLikeDeclaration) {
val descriptor = context[BindingContext.DECLARATION_TO_DESCRIPTOR, declaration] as? ClassifierDescriptor ?: continue
val ktSymbol = descriptor.toKtClassifierSymbol(analysisContext) ?: continue
val ktSymbol = descriptor.takeIf { nameFilter(it.name) }?.toKtClassifierSymbol(analysisContext) ?: continue
yield(ktSymbol)
}
}