Revert "Do not resolve import to get imported name"
This reverts commit 60c3e644
This commit is contained in:
@@ -115,18 +115,10 @@ open class LazyImportResolver<I : KtImportInfo>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
val allNames: Set<Name>? by lazy(LazyThreadSafetyMode.PUBLICATION) {
|
val allNames: Set<Name>? by lazy(LazyThreadSafetyMode.PUBLICATION) {
|
||||||
indexedImports.imports.flatMapToNullable(THashSet()) {
|
indexedImports.imports.flatMapToNullable(THashSet()) { getImportScope(it).computeImportedNames() }
|
||||||
if (it.isAllUnder) getImportScope(it).computeImportedNames()
|
|
||||||
else listOf(it.importedName)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun definitelyDoesNotContainName(name: Name): Boolean {
|
fun definitelyDoesNotContainName(name: Name) = allNames?.let { name !in it } == true
|
||||||
return indexedImports.imports.find {
|
|
||||||
if (it.isAllUnder) getImportScope(it).definitelyDoesNotContainName(name) //todo: optimize...
|
|
||||||
else it.importedName == name
|
|
||||||
} != null
|
|
||||||
}
|
|
||||||
|
|
||||||
fun recordLookup(name: Name, location: LookupLocation) {
|
fun recordLookup(name: Name, location: LookupLocation) {
|
||||||
if (allNames == null) return
|
if (allNames == null) return
|
||||||
|
|||||||
Reference in New Issue
Block a user