Drop location parameter from ResolutionScope::definitelyDoesNotContainName
definitelyDoesNotContainName is called too eagerly sometimes and it leads to obviously redundant lookups The idea is to put responsibility for calling recordLookup to resolution itself
This commit is contained in:
+1
-1
@@ -107,7 +107,7 @@ class MetadataPackageFragment(
|
||||
containerSource = null, components = components, classNames = { emptyList() }
|
||||
) {
|
||||
override fun hasClass(name: Name): Boolean = hasTopLevelClass(name)
|
||||
override fun definitelyDoesNotContainName(name: Name, location: LookupLocation) = false
|
||||
override fun definitelyDoesNotContainName(name: Name) = false
|
||||
override fun getClassifierNames(): Set<Name>? = null
|
||||
})
|
||||
|
||||
|
||||
+1
-2
@@ -78,8 +78,7 @@ abstract class DeserializedMemberScope protected constructor(
|
||||
override fun getVariableNames() = variableNamesLazy
|
||||
override fun getClassifierNames(): Set<Name>? = classNames + typeAliasNames
|
||||
|
||||
override fun definitelyDoesNotContainName(name: Name, location: LookupLocation): Boolean {
|
||||
recordLookup(name, location)
|
||||
override fun definitelyDoesNotContainName(name: Name): Boolean {
|
||||
return name !in functionNamesLazy && name !in variableNamesLazy && name !in classNames && name !in typeAliasNames
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user