[LC] FakeFileForLightClass: drop stub access from equals/hashCode

^KT-57857 Fixed
This commit is contained in:
Dmitrii Gridin
2023-04-06 21:18:03 +02:00
committed by Space Team
parent d0847f2519
commit 7d37bb1f78
6 changed files with 30 additions and 31 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -117,10 +117,8 @@ abstract class KtLightClassImpl(
abstract override fun copy(): PsiElement
private val _containingFile: PsiFile by lazyPub {
object : FakeFileForLightClass(
classOrObject.containingKtFile,
{ if (classOrObject.isTopLevel()) this else getOutermostClassOrObject(classOrObject).toLightClass()!! },
) {
val lightClass = if (classOrObject.isTopLevel()) this else getOutermostClassOrObject(classOrObject).toLightClass()!!
object : FakeFileForLightClass(classOrObject.containingKtFile, lightClass) {
override fun findReferenceAt(offset: Int) = ktFile.findReferenceAt(offset)
override fun processDeclarations(