More efficient treatment of single class imports

This commit is contained in:
Valentin Kipyatkov
2014-11-01 00:45:07 +03:00
parent e14529eff7
commit ccb7ba5517
@@ -167,7 +167,11 @@ public class LazyImportScope(private val resolveSession: ResolveSession,
throw IllegalStateException("Recursion while resolving many imports: " + directive.getText())
}
descriptors.addAll(getImportScope(directive, LookupMode.EVERYTHING).getDescriptors(kindFilter, nameFilter))
val importPath = directive.getImportPath() ?: continue
val importedName = importPath.getImportedName()
if (importedName == null || nameFilter(importedName)) {
descriptors.addAll(getImportScope(directive, LookupMode.EVERYTHING).getDescriptors(kindFilter, nameFilter))
}
}
descriptors