Skip to content

Commit c27f870

Browse files
committed
Avoid retraversing parts of the tree that do not contain Quote trees
1 parent 35cc2ba commit c27f870

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,8 @@ class PickleQuotes extends MacroTransform {
9595
case Apply(Select(quote: Quote, nme.apply), List(quotes)) =>
9696
val (contents, quote1) = makeHoles(quote)
9797
val quote2 = encodeTypeArgs(quote1)
98-
val contents1 = contents ::: quote.tags
99-
val pickled = PickleQuotes.pickle(quote2, quotes, contents1)
100-
transform(pickled) // pickle quotes that are in the contents
98+
val contents1 = contents.map(transform(_)) ::: quote.tags
99+
PickleQuotes.pickle(quote2, quotes, contents1)
101100
case tree: DefDef if !tree.rhs.isEmpty && tree.symbol.isInlineMethod =>
102101
tree
103102
case _ =>

0 commit comments

Comments
 (0)