diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/scopes/utils/ScopeUtils.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/scopes/utils/ScopeUtils.kt index ded44def4e5..da2eca6fa8f 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/scopes/utils/ScopeUtils.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/scopes/utils/ScopeUtils.kt @@ -93,7 +93,10 @@ fun DeclarationDescriptor.canBeResolvedWithoutDeprecation( return false } -fun HierarchicalScope.findFirstClassifierWithDeprecationStatus(name: Name, location: LookupLocation): DescriptorWithDeprecation? { +fun HierarchicalScope.findFirstClassifierWithDeprecationStatus( + name: Name, + location: LookupLocation +): DescriptorWithDeprecation? { return findFirstFromMeAndParent { it.getContributedClassifierIncludeDeprecated(name, location) } } @@ -246,7 +249,10 @@ fun LexicalScope.createScopeForDestructuring(newReceiver: ReceiverParameterDescr ) } -private class LexicalScopeWrapper(val delegate: LexicalScope, val newImportingScopeChain: ImportingScope) : LexicalScope by delegate { +private class LexicalScopeWrapper( + val delegate: LexicalScope, + private val newImportingScopeChain: ImportingScope +) : LexicalScope by delegate { init { assert(delegate !is LexicalScopeWrapper) { "Do not wrap again to avoid performance issues"