Closed samczsun closed 8 years ago
Thanks for the report. I'll look into it later.
Should be fixed now.
PS: You don't actually need a constructor
Oops, looks like it's still not working
Previously, that was true, but my last change should have fixed that. I'll have to look into it again to figure out why that didn't work.
2016-02-25 18:36 GMT-08:00 Sam Sun notifications@github.com:
I agree, but what I noticed was that Krakatau can distinguish that a new opcode will produce something nonnull. However, when you start swapping it around that's when Krakatau gets confused.
I don't know how Krakatau does it's optimizations but I'm assuming that this is just a case of misoptimization like the last issue.
— Reply to this email directly or view it on GitHub https://github.com/Storyyeller/Krakatau/issues/64#issuecomment-189084630 .
Should be fixed for real now.
Turns out it was just a stupid mistake. My first change only covered one of the two cases for initial constraint creation.
Here is the hand written bytecode
(I've thrown in some things to break all the other decompilers so people testing are forced to use Krakatau)
The output by Krakatau is this:
In the decompiled code, it appears that "This will be called" should be printed. After all,
a
will always be null. However, in reality "This won't be called" is printed