Temporarily disabled optimization for faster non-imported extensions completion because it causes duplicated items, added test for this problem

This commit is contained in:
Valentin Kipyatkov
2014-11-12 22:23:20 +03:00
parent b13c0f2248
commit eb25e47a51
4 changed files with 24 additions and 3 deletions
@@ -199,12 +199,13 @@ public class KotlinIndicesHelper(private val project: Project,
module: ModuleDescriptor,
bindingContext: BindingContext): Collection<CallableDescriptor> {
val fqnString = callableFQN.asString()
val descriptors = if (index != null) {
val descriptors = /* this code is temporarily disabled because taking descriptors from another resolve session causes duplicates and potentially other problems*/
/*if (index != null) {
index.get(fqnString, project, scope)
.filter { it.getReceiverTypeReference() != null }
.map { it.getLazyResolveSession().resolveToDescriptor(it) as CallableDescriptor }
}
else {
else*/ run {
val importDirective = JetPsiFactory(project).createImportDirective(fqnString)
analyzeImportReference(importDirective, resolutionScope, BindingTraceContext(), module)
.filterIsInstance(javaClass<CallableDescriptor>())