File tree 2 files changed +14
-0
lines changed
compiler/src/dotty/tools/dotc/typer
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -378,6 +378,7 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
378
378
// avoid type aliases for tuples
379
379
Right (MirrorSource .GenericTuple (types))
380
380
case _ => reduce(tp.underlying)
381
+ case tp : MatchType => reduce(tp.normalized)
381
382
case _ => reduce(tp.superType)
382
383
case tp @ AndType (l, r) =>
383
384
for
Original file line number Diff line number Diff line change
1
+ import deriving .Mirror
2
+ import compiletime .summonInline
3
+
4
+ inline def check1 [Tps <: NonEmptyTuple ]: Unit =
5
+ summonInline[Mirror .Of [Tuple .Head [Tps ]]]
6
+
7
+ inline def check2 [Tps <: NonEmptyTuple ]: Unit =
8
+ type FromType = Tuple .Head [Tps ]
9
+ summonInline[Mirror .Of [FromType ]]
10
+
11
+ @ main def Test : Unit =
12
+ check1[Option [Int ] *: EmptyTuple ] // Ok
13
+ check2[Option [Int ] *: EmptyTuple ] // Error: FromType is widened to Any in Syntheziser
You can’t perform that action at this time.
0 commit comments