File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package unsigned
22
33import java.math.BigInteger
44import kotlin.experimental.and
5+ import kotlin.experimental.inv
56import kotlin.experimental.or
67import kotlin.experimental.xor
78
@@ -106,7 +107,7 @@ data class Ubyte(var v: Byte = 0) : Number() {
106107 infix fun shr (b : Byte ) = Ubyte (toInt() ushr b.toUInt())
107108 infix fun shr (b : Int ) = Ubyte (toInt() ushr b)
108109
109- fun inv () = Ubyte (toInt() .inv ())
110+ fun inv () = Ubyte (v .inv ())
110111
111112 operator fun compareTo (b : Ubyte ) = Integer .compareUnsigned(toInt(), b.toInt())
112113 operator fun compareTo (b : Byte ) = Integer .compareUnsigned(toInt(), b.toUInt())
@@ -352,7 +353,7 @@ data class Ushort(var v: Short = 0) : Number() {
352353 infix fun shr (b : Short ) = Ushort (toInt() ushr b.toUInt())
353354 infix fun shr (b : Int ) = Ushort (toInt() ushr b)
354355
355- fun inv () = Ushort (toInt() .inv ())
356+ fun inv () = Ushort (v .inv ())
356357
357358 operator fun compareTo (b : Ushort ) = Integer .compareUnsigned(toInt(), b.toInt())
358359 operator fun compareTo (b : Short ) = Integer .compareUnsigned(toInt(), b.toUInt())
You can’t perform that action at this time.
0 commit comments