File tree Expand file tree Collapse file tree 1 file changed +8
-13
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -48,23 +48,18 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
48
48
case _ => EmptyTree
49
49
end synthesizedClassTag
50
50
51
- /** Synthesize the tree for `' [T]` for an implicit `scala.quoted.Type[T]`.
51
+ /** Synthesize the tree for `scala.quoted.Type [T]` for an implicit `scala.quoted.Type[T]`.
52
52
* `T` is deeply dealiased to avoid references to local type aliases.
53
53
*/
54
54
val synthesizedTypeTag : SpecialHandler = (formal, span) =>
55
- def quotedType (t : Type ) =
56
- val qctx = ctx.typer.inferImplicitArg(defn.QuoteContextClass .typeRef, span)
57
- qctx.tpe match
58
- case tpe : Implicits .SearchFailureType => report.error(tpe.msg, ctx.source.atSpan(span))
59
- case _ =>
60
- ref(defn.QuotedTypeModule_apply ).appliedToType(t).select(nme.apply).appliedTo(qctx)
61
- formal.argInfos match
62
- case arg :: Nil =>
63
- val deepDealias = new TypeMap :
64
- def apply (tp : Type ): Type = mapOver(tp.dealias)
65
- quotedType(deepDealias(arg))
55
+ val qctx = ctx.typer.inferImplicitArg(defn.QuoteContextClass .typeRef, span)
56
+ qctx.tpe match
57
+ case tpe : Implicits .SearchFailureType => report.error(tpe.msg, ctx.source.atSpan(span))
66
58
case _ =>
67
- EmptyTree
59
+ val deepDealias = new TypeMap :
60
+ def apply (tp : Type ): Type = mapOver(tp.dealias)
61
+ val t = deepDealias(formal.select(tpnme.spliceType))
62
+ ref(defn.QuotedTypeModule_apply ).appliedToType(t).select(nme.apply).appliedTo(qctx)
68
63
end synthesizedTypeTag
69
64
70
65
val synthesizedTupleFunction : SpecialHandler = (formal, span) =>
You can’t perform that action at this time.
0 commit comments