Why there is no `shr`/`shl` for `UByte`?
# announcements
m
Why there is no `shr`/`shl` for
UByte
?
h
Good question. I suggest you open an issue: https://kotl.in/issue youtrack
r
Ultimately, all integral operators on the JVM convert to and return
Int
. I imagine that is the limitation at play. (Correction, this is only for integral types <= 32 bits)
Ô׼ 1
i
For the same reason as why there are no such operations defined on `Byte`: we haven't yet decided what their behavior should be. You can follow https://youtrack.jetbrains.com/issue/KT-31083.
­čÖĆ 2
m
Oh that's interesting, I thought there is one for Byte. TIL
101 Views