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

fix(PositionBuilder): Position of annotations on type reference are included in parent position #3359

Merged
merged 6 commits into from
May 8, 2020

Conversation

nharrand
Copy link
Collaborator

@nharrand nharrand commented May 7, 2020

fix #3321

Reproduces #3358

@nharrand nharrand changed the title test: Annotation position should be included in parent element's position fix(PositionBuilder): Position of annotation on type reference should be included in parent element's position May 7, 2020
@nharrand
Copy link
Collaborator Author

nharrand commented May 7, 2020

This a cleaner workaround for #3359 . It fix the position of annotated CtTypeReferences.

Yet it still does not handle the case AnnoUser#m6() where a mix of annotation affect alternatively the type reference and the variable in an unfortunate order.
But the approach here cannot handle this case. To do it perfectly we need a post processing pass on all annotations and their parent to update parents positions.

@monperrus
Copy link
Collaborator

nice, thanks @nharrand ! FYI CI still red.

@monperrus monperrus changed the title fix(PositionBuilder): Position of annotation on type reference should be included in parent element's position fix(PositionBuilder): Position of annotations on type reference are included in parent position May 8, 2020
@monperrus monperrus merged commit 37b100a into INRIA:master May 8, 2020
@monperrus
Copy link
Collaborator

Thanks a lot @nharrand

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.

wrong prettyprint of javax annotation in sniper
2 participants