https://kotlinlang.org logo
Title
r

Rohan Maity

06/11/2019, 10:12 PM
I saw byte code for
val variable = 90
and in the decompiled bytecode it produced
int variable = true;
. I don't understand this ?
c

Czar

06/11/2019, 10:15 PM
Looks like a compiler optimization. You're probably not using the value
Yup, seems to be the case, as soon as you use the value, e.g.
println(variable)
it becomes
90
again.
k

karelpeeters

06/11/2019, 10:21 PM
Well the
90
is in the bytecode, so it's not actually optimized away.
c

Czar

06/11/2019, 10:47 PM
Huh, you're right.
g

gildor

06/12/2019, 12:39 AM
This is a decompiler 🤷 It may be buggy, especially with Kotlin, if it's easy to reproduce you can report on Kotlin issue tracker
i

itnoles

06/12/2019, 2:17 AM
He could be using those standard functions.
r

Rohan Maity

06/13/2019, 5:52 AM
standard functions ?
Okay I will report in issue tracker