[light classes] avoid resolve in equals

^KTIJ-21209
This commit is contained in:
Dmitry Gridin
2022-02-23 11:13:15 +07:00
parent 8811f62300
commit 261cac7514
2 changed files with 2 additions and 4 deletions
@@ -137,8 +137,7 @@ internal abstract class KtUltraLightMethod(
override fun equals(other: Any?): Boolean = other === this || override fun equals(other: Any?): Boolean = other === this ||
other is KtUltraLightMethod && other is KtUltraLightMethod &&
other.methodIndex == methodIndex && other.methodIndex == methodIndex &&
super.equals(other) && super.equals(other)
other.delegate == delegate
override fun hashCode(): Int = super.hashCode().times(31).plus(methodIndex.hashCode()) override fun hashCode(): Int = super.hashCode().times(31).plus(methodIndex.hashCode())
@@ -155,8 +155,7 @@ open class KtLightMethodImpl protected constructor(
other.javaClass == javaClass && other.javaClass == javaClass &&
other.memberIndex == memberIndex && other.memberIndex == memberIndex &&
other.containingClass == containingClass && other.containingClass == containingClass &&
other.lightMemberOrigin == lightMemberOrigin && other.lightMemberOrigin == lightMemberOrigin
other.dummyDelegate == dummyDelegate
override fun hashCode(): Int = name.hashCode() override fun hashCode(): Int = name.hashCode()
.times(31).plus(containingClass.hashCode()) .times(31).plus(containingClass.hashCode())