KtLightField/Method: Use equality in equivalence checks
Avoid computing delegate to determine equivalence
This commit is contained in:
@@ -117,7 +117,7 @@ sealed class KtLightFieldImpl<T: PsiField>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun isEquivalentTo(another: PsiElement?): Boolean {
|
override fun isEquivalentTo(another: PsiElement?): Boolean {
|
||||||
if (another is KtLightField && kotlinOrigin == another.kotlinOrigin && clsDelegate == another.clsDelegate) {
|
if (another is KtLightField && this == another) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return super.isEquivalentTo(another)
|
return super.isEquivalentTo(another)
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ class KtLightMethodImpl private constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun isEquivalentTo(another: PsiElement?): Boolean {
|
override fun isEquivalentTo(another: PsiElement?): Boolean {
|
||||||
if (another is KtLightMethod && kotlinOrigin == another.kotlinOrigin && clsDelegate == another.clsDelegate) {
|
if (another is KtLightMethod && this == another) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user