Closed scabug closed 6 years ago
Imported From: https://issues.scala-lang.org/browse/SI-8771?orig=1 Reporter: @xeno-by Affected Versions: 2.11.2
@xeno-by said (edited on Aug 1, 2014 2:25:01 PM UTC): Works in 2.11.1, but not in 2.11.2.
Caused by the fact that paramss extracted in a quasiquote get a more precise position in 2.11.2 (a range position, as opposed to an offset position in earlier versions), which crashes TreeGen.mkTemplate when these argss are spliced into a new quasiquote.
@xeno-by said: A workaround here would be to call duplicate on paramss (i.e. to splice not ...$paramss, but ...${paramss.map(.map(.duplicate))}}. That will reset their positions to offset positions guaranteeing successful completion of mkTemplate.
@xeno-by said: This issue is automatically worked around for macro annotations in macro paradise versions 2.0.2-SNAPSHOT, 2.1.0-SNAPSHOT and 2.1.0-M3. See https://github.com/scalamacros/paradise/issues/53 for details.
I believe I'm seeing this with Scala 2.11.11 and macro paradise 2.1.0. Can put together a repro if that's not known to be possible.
closing all quasiquotes tickets; see #10755