Skip to content

Conversation

@nicolasstucki
Copy link
Contributor

Detected the missing positions in #5846 (7a07485)

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


def copy(original: TypeTest)(tpt: TypeTree)(implicit ctx: Context): TypeTest =
tpd.cpy.Typed(original)(untpd.Ident(nme.WILDCARD).withType(tpt.tpe), tpt)
tpd.cpy.Typed(original)(untpd.Ident(nme.WILDCARD).withSpan(original.span).withType(tpt.tpe), tpt)
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to be an argument that we should disregard TypeTrees in TastyReflect -- they are not reliable, macros should always depend on types instead of type trees.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need the trees for positions. And this is not a type tree, it is the pattern _: T of a case _: T =>

@nicolasstucki nicolasstucki merged commit 60c4bf8 into scala:master Feb 20, 2019
@ghost ghost removed the stat:needs review label Feb 20, 2019
@nicolasstucki nicolasstucki deleted the add-missing-pattern-positions branch February 20, 2019 15:03
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