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: fix sniper bug delated to source position of super reference #4092

Merged

Conversation

slarse
Copy link
Collaborator

@slarse slarse commented Aug 12, 2021

Fix #4021

See #4021 (comment) for a description of the problem.

The tl;dr is that the end position of a super reference is incorrect from JDT when it's followed by a unary operator. This PR simply sets the end position of a super reference relative to it's start position, which is possible as super always has the same amount of characters.

@slarse slarse changed the title fix: Fix source position of super reference when followed by unary operator wip: fix: Fix source position of super reference when followed by unary operator Aug 12, 2021
@slarse slarse changed the title wip: fix: Fix source position of super reference when followed by unary operator review: fix: Fix source position of super reference when followed by unary operator Aug 12, 2021
@slarse slarse changed the title review: fix: Fix source position of super reference when followed by unary operator review: fix: Set end source position of super reference relative to start Aug 12, 2021
@monperrus
Copy link
Collaborator

Neat! Will merge. Thanks @slarse

@monperrus monperrus changed the title review: fix: Set end source position of super reference relative to start fix: fix sniper bug delated to source position of super reference Aug 13, 2021
@monperrus monperrus merged commit b5cd560 into INRIA:master Aug 13, 2021
@monperrus monperrus mentioned this pull request Aug 19, 2021
woutersmeenk pushed a commit to woutersmeenk/spoon that referenced this pull request Aug 29, 2021
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.

bug: Combining CtSuperAccess and CtUnaryOperator lead to SpoonException with Sniper
2 participants