Remove custom hashCode and equals from unsigned types

The generated ones are ok now (on JVM)
This commit is contained in:
Ilya Gorbunov
2018-08-16 04:03:13 +03:00
parent f367322084
commit 76ff4c9b2f
5 changed files with 0 additions and 31 deletions
-11
View File
@@ -229,17 +229,6 @@ class UnsignedTypeGenerator(val type: UnsignedType, out: PrintWriter) : BuiltIns
UnsignedType.ULONG -> out.println("ulongToString(data)")
else -> error(type)
}
out.println()
out.print(" public override fun hashCode(): Int = ")
when (type) {
UnsignedType.UBYTE, UnsignedType.USHORT, UnsignedType.UINT -> out.println("toInt()")
UnsignedType.ULONG -> out.println("((this shr 32).toInt() xor this.toInt())")
}
out.println()
out.println(" public override fun equals(other: Any?): Boolean =")
out.println(" other is ${type.capitalized} && this.data == other.data")
out.println()
}