Skip to content

Move Given Last in Instance Definitions #6486

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 4 commits into from
May 16, 2019

Conversation

odersky
Copy link
Contributor

@odersky odersky commented May 9, 2019

This required some tweaks to position checking, since given coming last represents an irregular case.

odersky added 4 commits May 9, 2019 16:55
So far pathTo(span) would only guarantee to return the path
to the closest tree enclosing `span` if trees were non-overlapping.
This is property does not hold for typed trees, yet `pathTo` is called
from `Interactive` on such typed trees.

This commit makes `pathTo` work correctly also for overlapping trees.
With given coming last, some of the no-overlaps and in-order position
checks have to be weakened. But with the more generalized pathTo
implementation, non-overlapping and in-order is not really needed anymore.
Copy link
Contributor

@biboudis biboudis left a comment

Choose a reason for hiding this comment

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

LGTM

@biboudis biboudis merged commit 12d3147 into scala:master May 16, 2019
@biboudis biboudis deleted the given-last branch May 16, 2019 11:26
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