[Analysis API] optimize scope members processing when a candidate name set is known

Use KtScope.getCallableSymbols/getClassifier symbols overloads which accept a candidate name set.

^KT-58653
This commit is contained in:
Ilya Kirillov
2023-05-12 11:23:30 +02:00
committed by Space Team
parent 29be88e3c9
commit 41976a2932
5 changed files with 8 additions and 9 deletions
@@ -66,8 +66,7 @@ sealed class SymbolData {
val classSymbol =
getClassOrObjectSymbolByClassId(classId)
?: error("Class $classId is not found")
classSymbol.getDeclaredMemberScope().getCallableSymbols()
.filter { (it as? KtNamedSymbol)?.name == callableId.callableName }
classSymbol.getDeclaredMemberScope().getCallableSymbols(callableId.callableName)
.toList()
}
if (symbols.isEmpty()) {