Clean up after reusing allDescriptors() from LazyJavaScope to avoid compute contributed descriptors in LazyJavaPackageScope
This commit is contained in:
+6
-6
@@ -174,11 +174,11 @@ class LazyJavaPackageScope(
|
|||||||
// combined computeDescriptors() and computeClassNames()
|
// combined computeDescriptors() and computeClassNames()
|
||||||
// computeFunctionNames and computePropertyNames return always emptySet
|
// computeFunctionNames and computePropertyNames return always emptySet
|
||||||
// therefore don't need to check if kindFilter anything else but CLASSIFIERS
|
// therefore don't need to check if kindFilter anything else but CLASSIFIERS
|
||||||
if (!kindFilter.acceptsKinds(DescriptorKindFilter.CLASSIFIERS_MASK or DescriptorKindFilter.NON_SINGLETON_CLASSIFIERS_MASK))
|
return if (!kindFilter.acceptsKinds(DescriptorKindFilter.CLASSIFIERS_MASK or DescriptorKindFilter.NON_SINGLETON_CLASSIFIERS_MASK)) {
|
||||||
emptyList<DeclarationDescriptor>()
|
emptyList()
|
||||||
|
} else {
|
||||||
// we don't use implementation from super which caches all descriptors and does not use filters
|
// we don't use implementation from super which caches all descriptors and does not use filters
|
||||||
val allContributedDescriptors = allDescriptors()
|
allDescriptors().filter { it is ClassDescriptor && nameFilter(it.name) }.toList()
|
||||||
return allContributedDescriptors.filter { it is ClassDescriptor && nameFilter(it.name) }.toList()
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user