From e17c055df049c6f8b42d31629e70df5bb44e2bfb Mon Sep 17 00:00:00 2001 From: Denys Shabalin Date: Mon, 24 Feb 2014 15:10:39 +0100 Subject: SI-8275 allow to directly extract block contents of the case def Due to the fact that blocks in cases are implicit one might expect to be able to extract its contents with `..$`. --- src/compiler/scala/tools/reflect/quasiquotes/Reifiers.scala | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/compiler/scala/tools/reflect') diff --git a/src/compiler/scala/tools/reflect/quasiquotes/Reifiers.scala b/src/compiler/scala/tools/reflect/quasiquotes/Reifiers.scala index 61fb22bc73..4937bfc35d 100644 --- a/src/compiler/scala/tools/reflect/quasiquotes/Reifiers.scala +++ b/src/compiler/scala/tools/reflect/quasiquotes/Reifiers.scala @@ -206,6 +206,8 @@ trait Reifiers { self: Quasiquotes => reifyBuildCall(nme.SyntacticTry, block, catches, finalizer) case Match(selector, cases) => reifyBuildCall(nme.SyntacticMatch, selector, cases) + case CaseDef(pat, guard, body) if fillListHole.isDefinedAt(body) => + mirrorCall(nme.CaseDef, reify(pat), reify(guard), mirrorBuildCall(nme.SyntacticBlock, fillListHole(body))) // parser emits trees with scala package symbol to ensure // that some names hygienically point to various scala package // members; we need to preserve this symbol to preserve -- cgit v1.2.3