Skip to content
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

There is no easy way to extract types from nested trees in quasiquote #8257

Closed
scabug opened this issue Feb 9, 2014 · 2 comments
Closed
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Feb 9, 2014

scala> val q"..$_; $_($_: ${tpe: Type})" = 
     |   typecheck(q"""
     |     def id(i: Int) = i
     |     val a = 42
     |     id(a)
     |   """)
tpe: reflect.runtime.universe.Type = Int

i.e. piggyback on ascription syntax to extract tree.tpe in pattern matching.
Alternatively the same can be done through magic annotation as in #8250 but ascription looks more elegant for this purpose.

@scabug
Copy link
Author

scabug commented Feb 9, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8257?orig=1
Reporter: @densh
Affected Versions: 2.11.0
See #8222, #8250

@SethTisue
Copy link
Member

closing all quasiquotes tickets; see #10755

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants