diff options
author | Denys Shabalin <denys.shabalin@typesafe.com> | 2014-03-09 14:04:05 +0200 |
---|---|---|
committer | Denys Shabalin <denys.shabalin@typesafe.com> | 2014-03-09 14:09:50 +0200 |
commit | f94959d3614d1f1702e9cd152c57f955ac58ce82 (patch) | |
tree | 96d98fb8d88ae576c30a4c2e8164d93047091deb /src/compiler/scala/tools/reflect | |
parent | 973f2255481c0ee3c9954d361ef3941186495c8f (diff) | |
download | scala-f94959d3614d1f1702e9cd152c57f955ac58ce82.tar.gz scala-f94959d3614d1f1702e9cd152c57f955ac58ce82.tar.bz2 scala-f94959d3614d1f1702e9cd152c57f955ac58ce82.zip |
SI-8385 make sure $quasiquote$tuple gets reified properly
Previously due to greediness of SyntacticApplied there was a chance that
quasiquote tuple placeholder got reified as its representation rather
than its meaning.
Diffstat (limited to 'src/compiler/scala/tools/reflect')
-rw-r--r-- | src/compiler/scala/tools/reflect/quasiquotes/Reifiers.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/reflect/quasiquotes/Reifiers.scala b/src/compiler/scala/tools/reflect/quasiquotes/Reifiers.scala index 5eae3b6e6f..b595e3ad2c 100644 --- a/src/compiler/scala/tools/reflect/quasiquotes/Reifiers.scala +++ b/src/compiler/scala/tools/reflect/quasiquotes/Reifiers.scala @@ -181,6 +181,10 @@ trait Reifiers { self: Quasiquotes => reifyBuildCall(nme.SyntacticForYield, enums, body) case SyntacticAssign(lhs, rhs) => reifyBuildCall(nme.SyntacticAssign, lhs, rhs) + // rest will always be non-empty due to the fact that every single-parens + // application will be reified by reifyTreePlaceholder before it gets here. + case SyntacticApplied(id @ Ident(nme.QUASIQUOTE_TUPLE), first :: rest) => + mirrorBuildCall(nme.SyntacticApplied, reifyTreePlaceholder(Apply(id, first)), reify(rest)) case SyntacticApplied(fun, argss) if argss.nonEmpty => reifyBuildCall(nme.SyntacticApplied, fun, argss) case SyntacticTypeApplied(fun, targs) if targs.nonEmpty => |