Optimize scopes handling inside LexicalChainedScope

This commit is contained in:
Ilya Chernikov
2020-06-02 23:12:20 +02:00
parent bf97323301
commit 3da6ff7ec3
4 changed files with 31 additions and 12 deletions
@@ -99,12 +99,14 @@ class ClassResolutionScopesSupport(
val parentForNewScope = companionObjectDescriptor?.packScopesOfCompanionSupertypes(parent, ownerDescriptor) ?: parent
val lexicalChainedScope = LexicalChainedScope(
val lexicalChainedScope = LexicalChainedScope.create(
parentForNewScope, ownerDescriptor,
isOwnerDescriptorAccessibleByLabel = false,
implicitReceiver = companionObjectDescriptor?.thisAsReceiverParameter,
kind = LexicalScopeKind.CLASS_INHERITANCE,
memberScopes = staticScopes,
classDescriptor.staticScope,
classDescriptor.unsubstitutedInnerClassesScope,
companionObjectDescriptor?.getStaticScopeOfCompanionObject(classDescriptor),
isStaticScope = true
)