File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ class Synthesizer(typer: Typer)(using @constructorOnly c: Context):
339339 * or a TermRef to a singleton value. These are
340340 * the base elements required to generate a mirror.
341341 */
342- def reduce (mirroredType : Type )(using Context ): Either [String , MirrorSource ] = mirroredType match
342+ def reduce (mirroredType : Type )(using Context ): Either [String , MirrorSource ] = mirroredType.normalized match
343343 case tp : TypeRef =>
344344 val sym = tp.symbol
345345 if sym.isClass then // direct ref to a class, not an alias
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