Skip to content

Commit fdad373

Browse files
committed
Merge branch 'master' into gradle5.0
# Conflicts: # .idea/modules/kotlin-unsigned.iml # build.gradle
2 parents b3e3a3b + 629d7cb commit fdad373

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

src/main/kotlin/unsigned/Ubyte.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,6 @@ class Ubyte(var v: Byte) : Number() {
9696
operator fun compareTo(b: Int) = toInt() compareUnsigned b
9797

9898
override fun toString() = toInt().toString()
99+
100+
override fun equals(other: Any?) = other is Ubyte && v == other.v
99101
}

src/main/kotlin/unsigned/Uint.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,6 @@ data class Uint(var v: Int = 0) : Number() {
7979

8080
override fun toString() = toLong().toString()
8181

82+
override fun equals(other: Any?) = other is Uint && v == other.v
8283
// TODO long?
8384
}

src/main/kotlin/unsigned/Ulong.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ data class Ulong(var v: Long = 0) : Number(), Comparable<Ulong> {
7474
// TODO others
7575

7676
override fun toString() = toBigInt().toString()
77+
override fun equals(other: Any?) = other is Ulong && v == other.v
7778

7879
operator fun rangeTo(b: Ulong) = UlongRange(this, b)
7980

src/main/kotlin/unsigned/Ushort.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,5 @@ data class Ushort(var v: Short = 0) : Number() {
9393
operator fun compareTo(b: Int) = toInt() compareUnsigned b
9494

9595
override fun toString() = toInt().toString()
96+
override fun equals(other: Any?) = other is Ushort && v == other.v
9697
}

0 commit comments

Comments
 (0)