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

Keep initializer position for lazy getter #3482

Merged
merged 2 commits into from
Sep 17, 2023

Conversation

Rawi01
Copy link
Collaborator

@Rawi01 Rawi01 commented Aug 13, 2023

This PR fixes #3481 and fixes #3448 and fixes #3314

javac uses the class UniquePos to cache method argument types. This leads to problems for generated nodes that share the same position.
We only handled that case for direct method invocations and not nested ones as reported in the linked issues. Simply keeping the original position for the whole initializer fixes this problem. This also leads to generated error messages for the initializer and not the getter annotation which is a nice side effect.

@Rawi01 Rawi01 linked an issue Sep 15, 2023 that may be closed by this pull request
@rzwitserloot rzwitserloot merged commit 60ed4ad into projectlombok:master Sep 17, 2023
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants