Skip to content

Conversation

@nicolasstucki
Copy link
Contributor

No description provided.

@nicolasstucki nicolasstucki force-pushed the add-missing-positions-in-tasty-reflect-constructors branch from 53c301b to acefb73 Compare February 18, 2019 07:33
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.

Why Context => T instead of T, given that we do not change the context.

Otherwise, LGTM

@liufengyun
Copy link
Contributor

Confirmed that it works for #5796.

Copy link
Contributor Author

@nicolasstucki nicolasstucki left a comment

Choose a reason for hiding this comment

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

We change the context to ctx.withSource(rootPosition.source) in withDefaultPos

  protected def withDefaultPos[T <: Tree](fn: Context => T)(implicit ctx: Context): T = {
    fn(ctx.withSource(rootPosition.source)).withSpan(rootPosition.span)
  }

@liufengyun liufengyun merged commit f4d02de into scala:master Feb 18, 2019
@liufengyun liufengyun deleted the add-missing-positions-in-tasty-reflect-constructors branch February 18, 2019 10:24
liufengyun added a commit to dotty-staging/dotty that referenced this pull request Feb 18, 2019
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