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

sometimes cannot splice lists of trees into a quasiquote #6840

Closed
scabug opened this issue Dec 18, 2012 · 3 comments

Comments

Projects
None yet
2 participants
@scabug
Copy link

commented Dec 18, 2012

val q"class $name extends Liftable { ..$body }" = tree
val newdefs = body collect { ... }
q"class $name extends AnyRef { ..${body ++ newdefs} }"

In this snippet above, body ++ newdefs doesn't work unless adorned in a toList.

@scabug

This comment has been minimized.

Copy link
Author

commented Dec 18, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6840?orig=1
Reporter: @xeno-by
Affected Versions: 2.11.0-M4
See #6155

@scabug

This comment has been minimized.

Copy link
Author

commented Oct 2, 2013

@densh said:
The problem is that typechecking with Any as expected type (declared type of the argument of the quasiquote) causes body ++ newdefs to be typechecked as Any.

This seems to be related to #6155.

@scabug

This comment has been minimized.

Copy link
Author

commented Oct 19, 2013

@scabug scabug closed this Oct 23, 2013

@scabug scabug added this to the 2.11.0-M7 milestone Apr 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.