elect
05/10/2020, 8:19 AMInt
as a Short
in the upper part of a Long
, but I get an out of range on declaring an hexadecimal number
val l = (value.toLong() shl 48) and 0xffff_0000_0000_0000 // Error:(103, 42) Kotlin: The value is out of range. Expected: Long. Found: Int
How can I solve? Casting to Long
doesnt helpilya.gorbunov
05/10/2020, 9:57 AMelect
05/10/2020, 10:42 AMilya.gorbunov
05/10/2020, 11:15 AMelect
05/10/2020, 11:15 AMelect
05/10/2020, 11:16 AM0x0000_fffff_0000_0000
Dominaezzz
05/10/2020, 4:36 PMelect
05/11/2020, 8:20 AMelect
05/11/2020, 8:46 AM0xffff_0000_ffff_ffffUL.toLong()