MrPowerGamerBR
11/26/2021, 2:34 AMprintln("Test: ${"297153970613387264".toLong()}")
prints...
Test: 297153970613387260
Only happens with the IR compiler, not with the Legacy compiler, I actually thought this was a kotlinx.serialization bug until I tried debugging it further to find out that it is actually Kotlin that is having the issue! 😭
Tested in Kotlin 1.5.31, haven't tested in Kotlin 1.6.0 yet because Jetpack Compose Web doesn't support Kotlin 1.6.0... yet!MrPowerGamerBR
11/26/2021, 2:37 AMtoLong()
conversions...
val value = 297153970613387264L
println("Real value: $value") // Real value: 297153970613387260
MrPowerGamerBR
11/26/2021, 2:40 AMULong
, then this doesn't happen
val value = 297153970613387264u
println("Real value: $value") // Real value: 297153970613387264
MrPowerGamerBR
11/26/2021, 2:43 AMMrPowerGamerBR
11/26/2021, 4:09 AMephemient
11/26/2021, 6:58 AMMrPowerGamerBR
11/26/2021, 11:08 AMMrPowerGamerBR
11/26/2021, 11:10 AMAyfri
11/26/2021, 12:16 PMephemient
11/26/2021, 12:22 PM