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
Can't match classOf after typechecking with quasiquotes #8384
Comments
Imported From: https://issues.scala-lang.org/browse/SI-8384?orig=1 |
@soc said: |
@xeno-by said: Another question is whether we want quasiquotes to match originals or expansions. I can see arguments for both approaches. Denys, wdyt? |
@densh said: I 'm not sure that matching macro originals by default is a good idea though. |
@densh said: typecheck(q"classOf[Int]") match {
case q"${const: Constant}" if const.value.isInstanceOf[Type] =>
println(const.asInstanceOf[Type].value)
} |
@soc said: |
@densh said: |
closing all quasiquotes tickets; see #10755 |
Due to change in the shape of classOf tree after typechecking one can't match it:
We also can't really implement syntactic abstraction over this without referential transparency as untyped classOf tree might or might not become a type literal depending on definitions in scope:
The text was updated successfully, but these errors were encountered: