[FIR] Implement equals & hashCode for candidates
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user