scala / bug

Scala 2 bug reports only. Please, no questions — proper bug reports only.
https://scala-lang.org
232 stars 21 forks source link

QQ crash extracting nested xml #8436

Closed scabug closed 6 years ago

scabug commented 10 years ago

SomeOne (SO) asked about extracting xml literals with q"<xml/>" in a macro.

Matching a nested literal hits SO (StackOverflow).

case q"<top><bottom></bottom></top>" =>
scabug commented 10 years ago

Imported From: https://issues.scala-lang.org/browse/SI-8436?orig=1 Reporter: @som-snytt Affected Versions: 2.11.0-RC3

scabug commented 10 years ago

@rjolly said: This is just to make sure it is added in the doc too : http://den.sh/quasiquotes.html#literal

scabug commented 10 years ago

@densh said: I've just added stubs to the doc not to forget about it.

scabug commented 10 years ago

@densh said (edited on Apr 1, 2014 7:51:54 PM UTC): Workaround: give more stack space to the compiler's JVM through -Xss flag.

scabug commented 10 years ago

@densh said (edited on Apr 1, 2014 7:00:55 PM UTC): It looks like quasiquotes generate legitimate code but there is just too much of it for pattern matcher to handle with default stack size.

scabug commented 10 years ago

@densh said: Better workaround: http://stackoverflow.com/a/22974059/1034615

SethTisue commented 6 years ago

closing all quasiquotes tickets; see #10755