Does anyone know why you can't use `0x800...` in K...
# getting-started
g
Does anyone know why you can't use
0x800...
in Kotlin? With the below, I get an error:
Copy code
fun readTopmostBitFromLong(value: Long): Boolean {
    return value and 0x8000000000000000L != 0L
}
2
one workaround:
0x8000000000000000UL.toLong()
in this case you can simply replace the function with
value < 0
though
g
Ah that's a good point, ty