File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -86,16 +86,16 @@ class Splicing extends MacroTransform:
86
86
override def transform (tree : tpd.Tree )(using Context ): tpd.Tree =
87
87
assert(level == 0 )
88
88
tree match
89
- case Apply (Select (_ : Quote , nme.apply), _) =>
90
- QuoteTransformer ().transform(tree)
89
+ case tree : Quote =>
90
+ val body1 = QuoteTransformer ().transform(tree.body)(using quoteContext)
91
+ cpy.Quote (tree)(body = body1)
91
92
case tree : DefDef if tree.symbol.is(Inline ) =>
92
93
// Quotes in inlined methods are only pickled after they are inlined.
93
94
tree
94
95
case _ =>
95
96
super .transform(tree)
96
97
end Level0QuoteTransformer
97
98
98
-
99
99
/** Transforms all direct splices in the current quote and replace them with holes. */
100
100
private class QuoteTransformer () extends Transformer :
101
101
/** Set of definitions in the current quote */
@@ -108,6 +108,7 @@ class Splicing extends MacroTransform:
108
108
private val typeHoles = mutable.Map .empty[TermRef , Hole ]
109
109
110
110
override def transform (tree : tpd.Tree )(using Context ): tpd.Tree =
111
+ assert(level > 0 )
111
112
tree match
112
113
case tree : Splice if level == 1 =>
113
114
val holeIdx = numHoles
You can’t perform that action at this time.
0 commit comments