PHondogo
12/21/2021, 10:10 AMvar b : Byte = 10.toByte()
b += 10.toByte()
Complains about type mismatch: Required Byte got Int.
Why?ephemient
12/21/2021, 10:12 AMoperator fun Byte.plus(other: Byte): Int
elizarov
12/21/2021, 10:59 AMInt
and Long
are for). So, do you arithmetics in Ints, then coerce and store to bytes if needed.PHondogo
12/21/2021, 11:16 AM