[FIR] Cache callable names in some composite scopes
This commit is contained in:
committed by
teamcityserver
parent
15be38192b
commit
6ef4523555
+4
-2
@@ -53,10 +53,12 @@ class JavaClassUseSiteMemberScope(
|
||||
|
||||
private val canUseSpecialGetters: Boolean by lazy { !klass.hasKotlinSuper(session) }
|
||||
|
||||
override fun getCallableNames(): Set<Name> {
|
||||
return declaredMemberScope.getContainingCallableNamesIfPresent() + superTypesScope.getCallableNames()
|
||||
private val callableNamesCached by lazy(LazyThreadSafetyMode.PUBLICATION) {
|
||||
declaredMemberScope.getContainingCallableNamesIfPresent() + superTypesScope.getCallableNames()
|
||||
}
|
||||
|
||||
override fun getCallableNames(): Set<Name> = callableNamesCached
|
||||
|
||||
override fun getClassifierNames(): Set<Name> {
|
||||
return declaredMemberScope.getContainingClassifierNamesIfPresent() + superTypesScope.getClassifierNames()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user