Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[core]missing '(long)' or '(int)' after operand '&=' #1620

Closed
AIRTEspresso opened this issue Aug 10, 2022 · 0 comments · Fixed by #2326
Closed

[core]missing '(long)' or '(int)' after operand '&=' #1620

AIRTEspresso opened this issue Aug 10, 2022 · 0 comments · Fixed by #2326
Labels
bug Core Issues in jadx-core module

Comments

@AIRTEspresso
Copy link

AIRTEspresso commented Aug 10, 2022

Describe error
Hi. Here is another syntax error.
Source code

class Test {
    long instanceCount;
    { 
        float f = 50.231F;
        instanceCount &= (long) f;
    }
}

and here is the decompiled code that cannot pass the compiler checking:

class Test {
    long instanceCount;

    Test() {
        this.instanceCount &= 50.231f;
    }
}

Here a '(long)' casting expression is missing after the '&='. Though it does not prevent us from understanding the code, I think will be better if we add a long casting expression here so that the decompiled code can be directly compiled again.
Would you like to have a look? All the source file, the compilation file and the decompiled files are available at
longCastMissingafter&=.zip

Version:
Jadx : 1.4.1
Java JDK: 11.0.3
Android decompiler: dx8 of 30.0.2 building tool
Input Version: dex files

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Core Issues in jadx-core module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant