Revert "Do not resolve import to get imported name"

This reverts commit 60c3e644
This commit is contained in:
Vladimir Dolzhenko
2019-06-19 09:20:28 +02:00
parent 7040639c38
commit f11a87e0c5
@@ -115,18 +115,10 @@ open class LazyImportResolver<I : KtImportInfo>(
}
val allNames: Set<Name>? by lazy(LazyThreadSafetyMode.PUBLICATION) {
indexedImports.imports.flatMapToNullable(THashSet()) {
if (it.isAllUnder) getImportScope(it).computeImportedNames()
else listOf(it.importedName)
}
indexedImports.imports.flatMapToNullable(THashSet()) { getImportScope(it).computeImportedNames() }
}
fun definitelyDoesNotContainName(name: Name): Boolean {
return indexedImports.imports.find {
if (it.isAllUnder) getImportScope(it).definitelyDoesNotContainName(name) //todo: optimize...
else it.importedName == name
} != null
}
fun definitelyDoesNotContainName(name: Name) = allNames?.let { name !in it } == true
fun recordLookup(name: Name, location: LookupLocation) {
if (allNames == null) return