[K/N] Fix comparison of IrConstantPrimitiveImpl
This commit is contained in:
+9
-3
@@ -19,12 +19,18 @@ class IrConstantPrimitiveImpl(
|
|||||||
) : IrConstantPrimitive() {
|
) : IrConstantPrimitive() {
|
||||||
override fun contentEquals(other: IrConstantValue) =
|
override fun contentEquals(other: IrConstantValue) =
|
||||||
other is IrConstantPrimitive &&
|
other is IrConstantPrimitive &&
|
||||||
|
type == other.type &&
|
||||||
value.type == other.value.type &&
|
value.type == other.value.type &&
|
||||||
value.kind == other.value.kind &&
|
value.kind == other.value.kind &&
|
||||||
value.value == other.value
|
value.value == other.value.value
|
||||||
|
|
||||||
override fun contentHashCode() =
|
override fun contentHashCode(): Int {
|
||||||
(value.type.hashCode() * 31 + value.kind.hashCode()) * 31 + value.value.hashCode()
|
var result = type.hashCode()
|
||||||
|
result = result * 31 + value.type.hashCode()
|
||||||
|
result = result * 31 + value.kind.hashCode()
|
||||||
|
result = result * 31 + value.value.hashCode()
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
override var type = value.type
|
override var type = value.type
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user