Should ```val b: Byte = 3 when(b) { 1 -> {} }``...
# announcements
d
Should
Copy code
val b: Byte = 3
when(b) { 1 -> {} }
compile? It currently fails with the message “Incompatible types, Int and Byte” because it treats 1 as an int literal, and there’s no way to specify byte literals. Asking here before I file a ticket (it also fails for Shorts).
r
dalexander: you should cast int into byte