Closed pubiqq closed 4 weeks ago
@pubiqq please describe what compare got changed/improved, because it is hard to see what was wrong only from changes. Also, please provide decompilation tests or at least samples which are improved after this change.
Thanks.
I see, so these issues was in incorrect cast removal because of incorrect type compare for long
and float
.
Looks like this happen because type inference never compare these types (2 register types not clash with 1 register types), and that was the only usage of that compare for a long time, cast check was added later.
The issue is not related to long
and float
only, but anyway, it's fixed now.
The PR fixes incorrect primitive-to-primitive conversions:
byte
->char
-WIDER
(notCONFLICT
)short
->char
-WIDER
(notCONFLICT
)char
->byte
-WIDER
(notCONFLICT
)char
->short
-WIDER
(notCONFLICT
)long
->float
-NARROW
(notWIDER
)float
->long
-WIDER
(notNARROW
)void
-CONFLICT
(notNARROW
)void
-> numeric -CONFLICT
(notWIDER
)Fixes https://github.com/skylot/jadx/issues/1620, fixes https://github.com/skylot/jadx/issues/1621, fixes https://github.com/skylot/jadx/issues/1626, indirectly fixes
JadxRuntimeException: Unknown type in literalToString: void
.