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

Quasiquotes crash if unlifted type is infinitely deep iterable #8466

Closed
scabug opened this issue Apr 1, 2014 · 2 comments
Closed

Quasiquotes crash if unlifted type is infinitely deep iterable #8466

scabug opened this issue Apr 1, 2014 · 2 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Apr 1, 2014

Due to bug in unlifting following code crashes with StackOverflow:

implicit val unliftXmlComment = Unliftable[xml.Comment] {
  case q"new _root_.scala.xml.Comment(${value: String})" => xml.Comment(value)
}
val q"${comment: xml.Comment}" = q"<!--foo-->"

This is caused by the fact that quasiquotes tries to recursively unwrap xml.Node as an iterable to figure out its rank but due to the fact that xml.Node is an Iterable[xml.Node] it causes infinite recursion.

@scabug
Copy link
Author

@scabug scabug commented Apr 1, 2014

Imported From: https://issues.scala-lang.org/browse/SI-8466?orig=1
Reporter: @densh
Affected Versions: 2.11.0

Loading

@scabug scabug closed this Apr 2, 2014
@scabug
Copy link
Author

@scabug scabug commented Apr 2, 2014

Loading

@scabug scabug added this to the 2.11.0-RC4 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants