Try to postpone activating decompiler from light element equivalence
This commit is contained in:
+8
-1
@@ -54,7 +54,10 @@ interface LightMemberOrigin : LightElementOrigin {
|
||||
val auxiliaryOriginalElement: KtDeclaration? get() = null
|
||||
|
||||
fun isValid(): Boolean
|
||||
|
||||
fun isEquivalentTo(other: LightMemberOrigin?): Boolean
|
||||
fun isEquivalentTo(other: PsiElement?): Boolean
|
||||
|
||||
fun copy(): LightMemberOrigin
|
||||
}
|
||||
|
||||
@@ -68,7 +71,11 @@ data class LightMemberOriginForDeclaration(
|
||||
|
||||
override fun isEquivalentTo(other: LightMemberOrigin?): Boolean {
|
||||
if (other !is LightMemberOriginForDeclaration) return false
|
||||
return originalElement.isEquivalentTo(other.originalElement)
|
||||
return isEquivalentTo(other.originalElement)
|
||||
}
|
||||
|
||||
override fun isEquivalentTo(other: PsiElement?): Boolean {
|
||||
return originalElement.isEquivalentTo(other)
|
||||
}
|
||||
|
||||
override fun copy(): LightMemberOrigin {
|
||||
|
||||
+3
-7
@@ -70,13 +70,9 @@ abstract class KtLightMemberImpl<out D : PsiMember>(
|
||||
}
|
||||
|
||||
override fun isEquivalentTo(another: PsiElement?): Boolean {
|
||||
if (lightMemberOrigin?.originalElement?.isEquivalentTo(another) == true) return true
|
||||
|
||||
val isEquivalentByOrigin =
|
||||
another is KtLightMember<*> &&
|
||||
lightMemberOrigin?.isEquivalentTo(another.lightMemberOrigin) == true
|
||||
|
||||
return isEquivalentByOrigin || this == another
|
||||
return this == another ||
|
||||
lightMemberOrigin?.isEquivalentTo(another) == true ||
|
||||
another is KtLightMember<*> && lightMemberOrigin?.isEquivalentTo(another.lightMemberOrigin) == true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user