[lc] decompiled: make isEquivalentTo lightweight
^KT-53934 Fixed
This commit is contained in:
+6
@@ -71,4 +71,10 @@ open class KtLightFieldForDecompiledDeclaration(
|
|||||||
override fun toString(): String = "${this.javaClass.simpleName} of $fldParent"
|
override fun toString(): String = "${this.javaClass.simpleName} of $fldParent"
|
||||||
|
|
||||||
override fun isValid(): Boolean = parent.isValid
|
override fun isValid(): Boolean = parent.isValid
|
||||||
|
|
||||||
|
override fun isEquivalentTo(another: PsiElement?): Boolean {
|
||||||
|
return this == another ||
|
||||||
|
another is KtLightFieldForDecompiledDeclaration && fldDelegate.isEquivalentTo(another.fldDelegate) ||
|
||||||
|
fldDelegate.isEquivalentTo(another)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+6
@@ -103,6 +103,12 @@ class KtLightMethodForDecompiledDeclaration(
|
|||||||
override fun isValid(): Boolean = parent.isValid
|
override fun isValid(): Boolean = parent.isValid
|
||||||
|
|
||||||
override fun getOriginalElement() = funDelegate
|
override fun getOriginalElement() = funDelegate
|
||||||
|
|
||||||
|
override fun isEquivalentTo(another: PsiElement?): Boolean {
|
||||||
|
return this == another ||
|
||||||
|
another is KtLightMethodForDecompiledDeclaration && funDelegate.isEquivalentTo(another.funDelegate) ||
|
||||||
|
funDelegate.isEquivalentTo(another)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun KtLightMethod.checkIsMangled(): Boolean {
|
private fun KtLightMethod.checkIsMangled(): Boolean {
|
||||||
|
|||||||
Reference in New Issue
Block a user