@@ -322,19 +322,15 @@ class ReifyQuotes extends MacroTransformWithImplicits {
322322 stats.foreach(markDef)
323323 mapOverTree(last)
324324 case Inlined (call, bindings, expansion @ Select (body, name)) if expansion.symbol.isSplice =>
325- if (level == 0 ) {
326- // To maintain phase consistency, we move the binding of the this parameter into the spliced code
327- val (thisBindings, otherBindings) = bindings.partition {
328- case vdef : ValDef => vdef.symbol.is(Synthetic ) // Assume that only _this bindings are tagged with Synthetic
329- case _ => false
330- }
331- val splicedBody = Splicer .splice(seq(thisBindings, body))
332- transform(cpy.Inlined (tree)(call, otherBindings, splicedBody))
333- } else {
334- // To maintain phase consistency, convert inlined expressions of the form
335- // `{ bindings; ~expansion }` to `~{ bindings; expansion }`
336- transform(cpy.Select (expansion)(cpy.Inlined (tree)(call, bindings, body), name))
325+ // To maintain phase consistency, we move the binding of the this parameter into the spliced code
326+ val (splicedBindings, stagedBindings) = bindings.partition {
327+ case vdef : ValDef => vdef.symbol.is(Synthetic ) // Assume that only _this bindings are tagged with Synthetic
328+ case _ => false
337329 }
330+ val tree1 =
331+ if (level == 0 ) cpy.Inlined (tree)(call, stagedBindings, Splicer .splice(seq(splicedBindings, body)))
332+ else seq(stagedBindings, cpy.Select (expansion)(cpy.Inlined (tree)(call, splicedBindings, body), name))
333+ transform(tree1)
338334 case _ : Import =>
339335 tree
340336 case tree : DefDef if tree.symbol.is(Macro ) && level == 0 =>
0 commit comments