Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add test for Expression Optimization Issue #449

Open
wants to merge 1 commit into
base: develop/1.11.0
Choose a base branch
from

Conversation

Owen1212055
Copy link

This includes a test for a strange issue that causes LVT reassignments to be lost.

Source:

double one = 1;
double shouldBeOne = one;
one = 0;
if (one > 1) {
}

System.out.println(shouldBeOne); // -> 1.0

Decompiles to:

double one = 1.0;
one = 0.0;
if (one > 1.0) {
}

System.out.println(one); // -> 0.0

Odd Case

It should be noted that without the if statement, it appears to work fine.

// Decompiles to without if statement
double one = 1.0;
double var5 = 0.0; // <- although interestingly, this LVT name is lost
System.out.println(one);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant