@@ -521,20 +521,16 @@ class ReifyQuotes extends MacroTransformWithImplicits with InfoTransformer {
521
521
stats.foreach(markDef)
522
522
mapOverTree(last)
523
523
case Inlined (call, bindings, InlineSplice (expansion @ Select (body, name))) =>
524
- // To maintain phase consistency, we move the binding of the this parameter into the spliced code
525
- val (splicedBindings, stagedBindings) = bindings.partition {
526
- case vdef : ValDef => vdef.symbol.is(Synthetic ) // Assume that only _this bindings are tagged with Synthetic
527
- case _ => false
528
- }
529
- // Simplification of the call done in PostTyper for non-macros can also be performed now
530
- // see PostTyper `case Inlined(...) =>` for description of the simplification
531
- val call2 =
532
- if (level == 0 ) Ident (call.symbol.topLevelClass.typeRef).withPos(call.pos)
533
- else call
534
- val tree1 =
535
- if (level == 0 ) cpy.Inlined (tree)(call2, stagedBindings, Splicer .splice(body, call, splicedBindings, tree.pos).withPos(tree.pos))
536
- else seq(stagedBindings, cpy.Select (expansion)(cpy.Inlined (tree)(call, splicedBindings, body), name))
537
- val tree2 = transform(tree1)
524
+ assert(call.symbol.is(Macro ))
525
+ val tree2 =
526
+ if (level == 0 ) {
527
+ // Simplification of the call done in PostTyper for non-macros can also be performed now
528
+ // see PostTyper `case Inlined(...) =>` for description of the simplification
529
+ val call2 = Ident (call.symbol.topLevelClass.typeRef).withPos(call.pos)
530
+ val spliced = Splicer .splice(body, call, bindings, tree.pos).withPos(tree.pos)
531
+ transform(cpy.Inlined (tree)(call2, bindings, spliced))
532
+ }
533
+ else super .transform(tree)
538
534
539
535
// due to value-discarding which converts an { e } into { e; () })
540
536
if (tree.tpe =:= defn.UnitType ) Block (tree2 :: Nil , Literal (Constant (())))
0 commit comments