Remove custom hashCode and equals from unsigned types
The generated ones are ok now (on JVM)
This commit is contained in:
@@ -138,11 +138,6 @@ public inline class UByte internal constructor(private val data: Byte) : Compara
|
||||
|
||||
public override fun toString(): String = toInt().toString()
|
||||
|
||||
public override fun hashCode(): Int = toInt()
|
||||
|
||||
public override fun equals(other: Any?): Boolean =
|
||||
other is UByte && this.data == other.data
|
||||
|
||||
}
|
||||
|
||||
@SinceKotlin("1.3")
|
||||
|
||||
@@ -142,11 +142,6 @@ public inline class UInt internal constructor(private val data: Int) : Comparabl
|
||||
|
||||
public override fun toString(): String = toLong().toString()
|
||||
|
||||
public override fun hashCode(): Int = toInt()
|
||||
|
||||
public override fun equals(other: Any?): Boolean =
|
||||
other is UInt && this.data == other.data
|
||||
|
||||
}
|
||||
|
||||
@SinceKotlin("1.3")
|
||||
|
||||
@@ -142,11 +142,6 @@ public inline class ULong internal constructor(private val data: Long) : Compara
|
||||
|
||||
public override fun toString(): String = ulongToString(data)
|
||||
|
||||
public override fun hashCode(): Int = ((this shr 32).toInt() xor this.toInt())
|
||||
|
||||
public override fun equals(other: Any?): Boolean =
|
||||
other is ULong && this.data == other.data
|
||||
|
||||
}
|
||||
|
||||
@SinceKotlin("1.3")
|
||||
|
||||
@@ -138,11 +138,6 @@ public inline class UShort internal constructor(private val data: Short) : Compa
|
||||
|
||||
public override fun toString(): String = toInt().toString()
|
||||
|
||||
public override fun hashCode(): Int = toInt()
|
||||
|
||||
public override fun equals(other: Any?): Boolean =
|
||||
other is UShort && this.data == other.data
|
||||
|
||||
}
|
||||
|
||||
@SinceKotlin("1.3")
|
||||
|
||||
Reference in New Issue
Block a user