@@ -157,6 +157,8 @@ class ReifyQuotes extends MacroTransform {
157
157
val tagDef = tagDefCache.getOrElseUpdate(prefix.symbol, mkTagSymbolAndAssignType(prefix))
158
158
tagDef.symbol.typeRef
159
159
}
160
+ case AnnotatedType (parent, _) =>
161
+ apply(parent) // Only keep the Annotated tree
160
162
case _ =>
161
163
mapOver(tp)
162
164
}
@@ -263,7 +265,7 @@ class ReifyQuotes extends MacroTransform {
263
265
assert(level == 1 , " unexpected top splice outside quote" )
264
266
val (body1, quotes) = nested(isQuote = false ).splitSplice(body)(spliceContext)
265
267
val tpe = outer.embedded.getHoleType(body, splice)
266
- val hole = makeHole(body1, quotes, tpe).withSpan(splice.span)
268
+ val hole = makeHole(splice.isTerm, body1, quotes, tpe).withSpan(splice.span)
267
269
// We do not place add the inline marker for trees that where lifted as they come from the same file as their
268
270
// enclosing quote. Any intemediate splice will add it's own Inlined node and cancel it before splicig the lifted tree.
269
271
// Note that lifted trees are not necessarily expressions and that Inlined nodes are expected to be expressions.
@@ -378,9 +380,9 @@ class ReifyQuotes extends MacroTransform {
378
380
/** Register `body` as an `embedded` quote or splice
379
381
* and return a hole with `splices` as arguments and the given type `tpe`.
380
382
*/
381
- private def makeHole (body : Tree , splices : List [Tree ], tpe : Type )(implicit ctx : Context ): Hole = {
383
+ private def makeHole (isTermHole : Boolean , body : Tree , splices : List [Tree ], tpe : Type )(implicit ctx : Context ): Hole = {
382
384
val idx = embedded.addTree(body, NoSymbol )
383
- Hole (idx, splices).withType(tpe).asInstanceOf [Hole ]
385
+ Hole (isTermHole, idx, splices).withType(tpe).asInstanceOf [Hole ]
384
386
}
385
387
386
388
override def transform (tree : Tree )(implicit ctx : Context ): Tree =
0 commit comments