I think I found a bug in kotlin 1.5.20, but I can't get a simple repro case. I have a
if
that's being skipped, even though it evluates to
true
in the debugger. I think it has to do w/ nullable types. There is a if statement above the one being skipped that under certin conditions will assign a instance to a nullable type. Then the second if statement checks some other conditions on that nullable type... but it looks like the compiler is just skipping the entire evluation of the second
if
TwoClocks
07/03/2021, 9:25 PM
the code in question is unchanged from 1.4.32, and has worked for a while now.
e
ephemient
07/03/2021, 9:44 PM
no repro case is difficult… can you at least diff the bytecode generated by each version?
t
TwoClocks
07/03/2021, 10:06 PM
I think I could do that. Do you have a prefered tool for that?
TwoClocks
07/03/2021, 10:06 PM
I did spend a hour to so trying to generate a repro case, but couldn't manage it.
TwoClocks
07/03/2021, 10:19 PM
hmm.. the generated java code looks the same. At least acording to this took in intellij.
TwoClocks
07/03/2021, 10:44 PM
byte code looks the same as well.... yet this if statement isn't being run.
TwoClocks
07/03/2021, 10:44 PM
or the tools I'm using to look at the bytecode arn't accurate.