From 7b0646d2a50956dbd8ad911f62384d3e58b50f1c Mon Sep 17 00:00:00 2001 From: Vladimir Dolzhenko Date: Sun, 13 Oct 2019 16:43:01 +0200 Subject: [PATCH] Reuse allDescriptors() from LazyJavaScope to avoid compute contributed descriptors in LazyJavaPackageScope --- .../kotlin/load/java/lazy/descriptors/LazyJavaScope.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaScope.kt b/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaScope.kt index 8b3def13ae9..fea51ab2259 100644 --- a/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaScope.kt +++ b/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaScope.kt @@ -64,7 +64,7 @@ abstract class LazyJavaScope( // this lazy value is not used at all in LazyPackageFragmentScopeForJavaPackage because we do not use caching there // but is placed in the base class to not duplicate code - private val allDescriptors = c.storageManager.createRecursionTolerantLazyValue>( + protected val allDescriptors = c.storageManager.createRecursionTolerantLazyValue>( { computeDescriptors(DescriptorKindFilter.ALL, MemberScope.ALL_NAME_FILTER) }, // This is to avoid the following recursive case: // when computing getAllPackageNames() we ask the JavaPsiFacade for all subpackages of foo