Skip to content

Commit c5f3503

Browse files
Allow cpy.Apply to not copy the tree
1 parent a4d553e commit c5f3503

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/transform/PCPCheckAndHeal.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class PCPCheckAndHeal(@constructorOnly ictx: Context) extends TreeMapWithStages(
124124
val targs2 = targs.map(targ => TypeTree(healTypeOfTerm(quote.fun.srcPos)(targ.tpe)))
125125
cpy.Apply(quote)(cpy.TypeApply(quote.fun)(fun, targs2), body2 :: Nil)
126126
else
127-
val quotes = quote.args.map(transform)
127+
val quotes = quote.args.mapConserve(transform)
128128
body.tpe match
129129
case tp @ TypeRef(x: TermRef, _) if tp.symbol == defn.QuotedType_splice =>
130130
// Optimization: `quoted.Type.of[x.Underlying](quotes)` --> `x`

0 commit comments

Comments
 (0)