File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,9 @@ class PCPCheckAndHeal(@constructorOnly ictx: Context) extends TreeMapWithStages(
103103 if (ctx.property(InAnnotation ).isDefined)
104104 report.error(" Cannot have a quote in an annotation" , quote.srcPos)
105105
106+ val stripAnnotsDeep : TypeMap = new TypeMap :
107+ def apply (tp : Type ): Type = mapOver(tp.stripAnnots)
108+
106109 val contextWithQuote =
107110 if level == 0 then contextWithQuoteTypeTags(taggedTypes)(using quoteContext)
108111 else quoteContext
@@ -115,7 +118,7 @@ class PCPCheckAndHeal(@constructorOnly ictx: Context) extends TreeMapWithStages(
115118 if body.isTerm then
116119 // `quoted.runtime.Expr.quote[T](<body>)` --> `quoted.runtime.Expr.quote[T2](<body2>)`
117120 val TypeApply (fun, targs) = quote.fun: @ unchecked
118- val targs2 = targs.map(targ => TypeTree (healTypeOfTerm(quote.fun.srcPos)(targ.tpe)))
121+ val targs2 = targs.map(targ => TypeTree (healTypeOfTerm(quote.fun.srcPos)(stripAnnotsDeep( targ.tpe) )))
119122 cpy.Apply (quote)(cpy.TypeApply (quote.fun)(fun, targs2), body2 :: Nil )
120123 else
121124 val quotes = quote.args.mapConserve(transform)
You can’t perform that action at this time.
0 commit comments