I’m having a bizarre situation here. I don’t know ...
# announcements
m
I’m having a bizarre situation here. I don’t know if I should report it as a bug Using kotlin
1.2.21
on Android, I have a String which is a hex number
0x10
, which should be decimal
16
.
Copy code
val x = "10"
x.toInt(16)
evaluates to
16
, as expected. But if I put it on a list, it evaluates to a Java
Integer
with the value
8
Copy code
val x = "10"
mutableListOf(x.toInt(16))