Skip to content

Fix #10771: Propagate missing span #10780

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
Dec 14, 2020

Conversation

nicolasstucki
Copy link
Contributor

No description provided.

@nicolasstucki nicolasstucki self-assigned this Dec 14, 2020
@nicolasstucki nicolasstucki marked this pull request as ready for review December 14, 2020 10:21
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

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

LGTM

else letBindUnless(TreeInfo.Pure, arg)(seq(trailing, _))
else
def argsSpan = trailing.map(_.span).foldLeft(arg.span)(_.union(_))
letBindUnless(TreeInfo.Pure, arg)(Block(trailing, _).withSpan(argsSpan))
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering if this logic can be moved to letBindUnless. Maybe add a TODO here.

Copy link
Contributor Author

@nicolasstucki nicolasstucki Dec 14, 2020

Choose a reason for hiding this comment

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

It would be more expensive to do it in letBindUnless. So far I've only seen this happened once inside a letBindUnless.

@nicolasstucki nicolasstucki merged commit fc8f8fb into scala:master Dec 14, 2020
@nicolasstucki nicolasstucki deleted the fix-#10771 branch December 14, 2020 11:27
@Kordyjan Kordyjan added this to the 3.0.0 milestone Aug 2, 2023
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.

Position Error when Combining Expr.ofList and inline Propagation into a different file
3 participants