[FIR] Implement equals & hashCode for candidates

This commit is contained in:
simon.ogorodnik
2020-04-01 20:42:31 +03:00
parent 7d3b2558f0
commit 851e2dbb68
@@ -124,4 +124,19 @@ class Candidate(
ExplicitReceiverKind.EXTENSION_RECEIVER, ExplicitReceiverKind.BOTH_RECEIVERS -> callInfo.explicitReceiver!!
else -> implicitExtensionReceiverValue?.receiverExpression ?: FirNoReceiverExpression
}
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as Candidate
if (symbol != other.symbol) return false
return true
}
override fun hashCode(): Int {
return symbol.hashCode()
}
}