More correct code

This commit is contained in:
Valentin Kipyatkov
2014-08-12 19:26:24 +04:00
parent 1b99ffb6b1
commit 6b8800f392
@@ -197,7 +197,7 @@ public class JetShortNamesCache(private val project: Project) : PsiShortNamesCac
val jetScope = resolveSession.resolveToElement(context).get(BindingContext.RESOLUTION_SCOPE, context) ?: return listOf()
allFqNames.filter { nameFilter(it.shortName().asString()) }
.toList()
.toSet()
.flatMapTo(result) { findTopLevelCallables(it, context, jetScope, resolveSession) }
return result
@@ -222,7 +222,7 @@ public class JetShortNamesCache(private val project: Project) : PsiShortNamesCac
// Iterate through the function with attempt to resolve found functions
return allFqNames
.filter { nameFilter(it.shortName().asString()) }
.toList()
.toSet()
.flatMap { ExpressionTypingUtils.canFindSuitableCall(it, receiverExpression, expressionType, jetScope, resolveSession.getModuleDescriptor()) }
}