Skip to content

Fix positions in assignments #2872

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

Merged
merged 1 commit into from
Jul 15, 2017
Merged

Conversation

smarter
Copy link
Member

@smarter smarter commented Jul 14, 2017

TreeCopier#finalize will set the position of the new tree to the old
tree, which is not what we want here since the desugared tree position
should contain more than the position of the parsed assignment lhs.
Moreover, the desugared tree will never be identical to the parsed lhs
so there is no reason to use a TreeCopier at all.

TreeCopier#finalize will set the position of the new tree to the old
tree, which is not what we want here since the desugared tree position
should contain more than the position of the parsed assignment lhs.
Moreover, the desugared tree will never be identical to the parsed lhs
so there is no reason to use a TreeCopier at all.
@smarter smarter requested a review from odersky July 14, 2017 18:36
Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@odersky odersky merged commit 0734ce9 into scala:master Jul 15, 2017
@allanrenucci allanrenucci deleted the fix-pos-assign branch December 14, 2017 19:20
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.

2 participants