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

LocalClassHydrator assumes incorrect order for fields #11

Closed
Machine-Maker opened this issue Aug 2, 2023 · 0 comments
Closed

LocalClassHydrator assumes incorrect order for fields #11

Machine-Maker opened this issue Aug 2, 2023 · 0 comments

Comments

@Machine-Maker
Copy link
Contributor

In determining captured values in the LocalClassHydrator, it assumes an incorrect order of fields, breaking out a loop to collect fields before all captured values have been collected.

class Demo {

	Demo(String arg1, String arg2) {
		
		class Other {
			private final String innerValue = "test";

			public String toString() {
				return arg2 + this.innerValue;
			}
		}

		new Other().toString();
	}
}

The above example produces a list of fields that begins with the "innerValue" field, then the 1 val$arg2 field, then the this$0 field.

@DenWav DenWav closed this as completed in b4a362f Aug 2, 2023
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

No branches or pull requests

1 participant