[Analysis API] add KtTypeScope.getCallableSignatures/getClassifierSymbols overloads which accept a candidate name set

This is needed for the cases when a candidate name set is known
to avoid retrieving a set with all possible names when processing the scope.

Similar to KtScope.

^KT-58653
This commit is contained in:
Ilya Kirillov
2023-05-12 15:50:31 +02:00
committed by Space Team
parent ee1fd9f6e9
commit f8ddf204e2
3 changed files with 62 additions and 2 deletions
@@ -41,10 +41,18 @@ internal open class KtFirDelegatingTypeScope(
firScope.getCallableSignatures(getPossibleCallableNames().filter(nameFilter), builder)
}
override fun getCallableSignatures(names: Collection<Name>): Sequence<KtCallableSignature<*>> = withValidityAssertion {
firScope.getCallableSignatures(names, builder)
}
override fun getClassifierSymbols(nameFilter: KtScopeNameFilter): Sequence<KtClassifierSymbol> = withValidityAssertion {
firScope.getClassifierSymbols(getPossibleClassifierNames().filter(nameFilter), builder)
}
override fun getClassifierSymbols(names: Collection<Name>): Sequence<KtClassifierSymbol> = withValidityAssertion {
firScope.getClassifierSymbols(names, builder)
}
override fun getConstructors(): Sequence<KtConstructorSymbol> = withValidityAssertion {
firScope.getConstructors(builder)
}