From f94959d3614d1f1702e9cd152c57f955ac58ce82 Mon Sep 17 00:00:00 2001 From: Denys Shabalin Date: Sun, 9 Mar 2014 14:04:05 +0200 Subject: 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. --- src/compiler/scala/tools/reflect/quasiquotes/Reifiers.scala | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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 => -- cgit v1.2.3