@@ -157,6 +157,8 @@ class ReifyQuotes extends MacroTransform {
157157 val tagDef = tagDefCache.getOrElseUpdate(prefix.symbol, mkTagSymbolAndAssignType(prefix))
158158 tagDef.symbol.typeRef
159159 }
160+ case AnnotatedType (parent, _) =>
161+ apply(parent) // Only keep the Annotated tree
160162 case _ =>
161163 mapOver(tp)
162164 }
@@ -263,7 +265,7 @@ class ReifyQuotes extends MacroTransform {
263265 assert(level == 1 , " unexpected top splice outside quote" )
264266 val (body1, quotes) = nested(isQuote = false ).splitSplice(body)(spliceContext)
265267 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)
267269 // We do not place add the inline marker for trees that where lifted as they come from the same file as their
268270 // enclosing quote. Any intemediate splice will add it's own Inlined node and cancel it before splicig the lifted tree.
269271 // 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 {
378380 /** Register `body` as an `embedded` quote or splice
379381 * and return a hole with `splices` as arguments and the given type `tpe`.
380382 */
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 = {
382384 val idx = embedded.addTree(body, NoSymbol )
383- Hole (idx, splices).withType(tpe).asInstanceOf [Hole ]
385+ Hole (isTermHole, idx, splices).withType(tpe).asInstanceOf [Hole ]
384386 }
385387
386388 override def transform (tree : Tree )(implicit ctx : Context ): Tree =
0 commit comments