You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Full runnable example below, but this is the key part:
privateinlinedefsummonElementTypeClasses[A](m: Mirror.Of[A]):IArray[Object] =// this doesn't work
summonAll[Tuple.Map[m.MirroredElemTypes, [A] =>>Lazy[MyTypeClass[A]]]].toIArray
// but this does// summonAll[Tuple.Map[Tuple.Map[m.MirroredElemTypes, MyTypeClass], Lazy]].toIArray
scala.MatchError: ClassInfo(ThisType(TypeRef(NoPrefix,module class <empty>)), class Example, List(TypeRef(ThisType(TypeRef(NoPrefix,module class lang)),class Object), TypeRef(TermRef(TermRef(NoPrefix,object _root_),object scala),trait Product), TypeRef(ThisType(TypeRef(NoPrefix,module class io)),trait Serializable))) (of class dotty.tools.dotc.core.Types$CachedClassInfo)
at dotty.tools.dotc.core.Types$TypeLambdaCompanion.toPInfo(Types.scala:3735)
at dotty.tools.dotc.core.Types$TypeLambdaCompanion.toPInfo(Types.scala:3733)
at dotty.tools.dotc.core.Types$LambdaTypeCompanion.fromParams$$anonfun$4$$anonfun$1(Types.scala:3721)
at scala.collection.immutable.List.map(List.scala:246)
at dotty.tools.dotc.core.Types$LambdaTypeCompanion.fromParams$$anonfun$2(Types.scala:3721)
at dotty.tools.dotc.core.Types$HKTypeLambda.<init>(Types.scala:3850)
at dotty.tools.dotc.core.Types$HKTypeLambda$.apply(Types.scala:3956)
at dotty.tools.dotc.core.Types$HKTypeLambda$.apply(Types.scala:3951)
at dotty.tools.dotc.core.Types$HKTypeLambda$.apply(Types.scala:3948)
at dotty.tools.dotc.core.Types$LambdaTypeCompanion.fromParams(Types.scala:3722)
at dotty.tools.dotc.core.Types$HKTypeLambda$.fromParams(Types.scala:3968)
at dotty.tools.dotc.typer.TypeAssigner.assignType(TypeAssigner.scala:467)
at dotty.tools.dotc.typer.TypeAssigner.assignType$(TypeAssigner.scala:19)
at dotty.tools.dotc.typer.Typer.assignType(Typer.scala:106)
at dotty.tools.dotc.typer.Typer.typeIndexedLambdaTypeTree(Typer.scala:1921)
at dotty.tools.dotc.typer.Typer.typedLambdaTypeTree(Typer.scala:1926)
at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2720)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
at dotty.tools.dotc.typer.Typer.typedArg$1(Typer.scala:1882)
at dotty.tools.dotc.typer.Typer.$anonfun$25(Typer.scala:1886)
at dotty.tools.dotc.core.Decorators$ListDecorator$.zipWithConserve$extension(Decorators.scala:153)
at dotty.tools.dotc.core.Decorators$ListDecorator$.zipWithConserve$extension(Decorators.scala:154)
I would expect that the type lambda works here.
This isn't a critical bug since it's easy to replace with two Tuple.Map, but I figured it's good to record an issue.
The text was updated successfully, but these errors were encountered:
Compiler version
3.0.2
Minimized code
Full runnable example below, but this is the key part:
Full reproducer:
https://scastie.scala-lang.org/OI631SqsStStKTxVkwJbjg
Output (click arrow to expand)
I would expect that the type lambda works here.
This isn't a critical bug since it's easy to replace with two Tuple.Map, but I figured it's good to record an issue.
The text was updated successfully, but these errors were encountered: