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
This is similar to code that would be generated for a Mirror - but I am using plain code to demonstrate that the problem is not to do with mirror synthesis itself.
The crucial part is apparently the implementation of M_Rgb, and that it references TRgb - aka result of a match type.
If I replace TRgb by Inner.Rgb then it works.
exception occurred while compiling tests/run/i13332shapeless-c.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: asTerm called on not-a-Termval<none>
at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
at dotty.tools.dotc.core.Symbols$Symbol.asTerm(Symbols.scala:169)
at dotty.tools.dotc.transform.ExplicitOuter$.dotty$tools$dotc$transform$ExplicitOuter$$$outerParamAccessor(ExplicitOuter.scala:230)
at dotty.tools.dotc.transform.ExplicitOuter$OuterOps$.loop$1(ExplicitOuter.scala:438)
at dotty.tools.dotc.transform.ExplicitOuter$OuterOps$.path$extension(ExplicitOuter.scala:447)
at dotty.tools.dotc.transform.LambdaLift$Lifter.memberRef(LambdaLift.scala:161)
at dotty.tools.dotc.transform.LambdaLift$Lifter.proxyRef(LambdaLift.scala:167)
at dotty.tools.dotc.transform.LambdaLift$Lifter.addFreeArgs$$anonfun$1(LambdaLift.scala:172)
at scala.collection.immutable.List.map(List.scala:246)
at dotty.tools.dotc.transform.LambdaLift$Lifter.addFreeArgs(LambdaLift.scala:172)
at dotty.tools.dotc.transform.LambdaLift.transformApply(LambdaLift.scala:310)
at dotty.tools.dotc.transform.LambdaLift.transformApply(LambdaLift.scala:309)
at dotty.tools.dotc.transform.MegaPhase.goApply(MegaPhase.scala:650)
at dotty.tools.dotc.transform.MegaPhase.transformUnnamed$1(MegaPhase.scala:280)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:427)
at dotty.tools.dotc.transform.MegaPhase.recur$1(MegaPhase.scala:459)
at dotty.tools.dotc.transform.MegaPhase.transformTrees(MegaPhase.scala:459)
at dotty.tools.dotc.transform.MegaPhase.transformUnnamed$1(MegaPhase.scala:279)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:427)
at dotty.tools.dotc.transform.MegaPhase.mapDefDef$1(MegaPhase.scala:248)
at dotty.tools.dotc.transform.MegaPhase.transformNamed$1(MegaPhase.scala:251)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:425)
at dotty.tools.dotc.transform.MegaPhase.loop$1(MegaPhase.scala:438)
at dotty.tools.dotc.transform.MegaPhase.transformStats(MegaPhase.scala:438)
at dotty.tools.dotc.transform.MegaPhase.transformUnnamed$1(MegaPhase.scala:359)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:427)
at dotty.tools.dotc.transform.MegaPhase.transformNamed$1(MegaPhase.scala:255)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:425)
at dotty.tools.dotc.transform.MegaPhase.loop$2(MegaPhase.scala:444)
at dotty.tools.dotc.transform.MegaPhase.transformBlock(MegaPhase.scala:449)
at dotty.tools.dotc.transform.MegaPhase.transformUnnamed$1(MegaPhase.scala:298)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:427)
at dotty.tools.dotc.transform.MegaPhase.transformUnnamed$1(MegaPhase.scala:320)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:427)
at dotty.tools.dotc.transform.MegaPhase.transformUnnamed$1(MegaPhase.scala:320)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:427)
at dotty.tools.dotc.transform.MegaPhase.loop$2(MegaPhase.scala:447)
at dotty.tools.dotc.transform.MegaPhase.transformBlock(MegaPhase.scala:449)
at dotty.tools.dotc.transform.MegaPhase.transformUnnamed$1(MegaPhase.scala:298)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:427)
at dotty.tools.dotc.transform.MegaPhase.mapValDef$1(MegaPhase.scala:234)
at dotty.tools.dotc.transform.MegaPhase.transformNamed$1(MegaPhase.scala:239)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:425)
at dotty.tools.dotc.transform.MegaPhase.loop$2(MegaPhase.scala:444)
at dotty.tools.dotc.transform.MegaPhase.transformBlock(MegaPhase.scala:449)
at dotty.tools.dotc.transform.MegaPhase.transformUnnamed$1(MegaPhase.scala:298)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:427)
at dotty.tools.dotc.transform.MegaPhase.mapDefDef$1(MegaPhase.scala:248)
at dotty.tools.dotc.transform.MegaPhase.transformNamed$1(MegaPhase.scala:251)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:425)
at dotty.tools.dotc.transform.MegaPhase.loop$1(MegaPhase.scala:438)
at dotty.tools.dotc.transform.MegaPhase.transformStats(MegaPhase.scala:438)
at dotty.tools.dotc.transform.MegaPhase.transformUnnamed$1(MegaPhase.scala:359)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:427)
at dotty.tools.dotc.transform.MegaPhase.transformNamed$1(MegaPhase.scala:255)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:425)
at dotty.tools.dotc.transform.MegaPhase.loop$2(MegaPhase.scala:444)
at dotty.tools.dotc.transform.MegaPhase.transformBlock(MegaPhase.scala:449)
at dotty.tools.dotc.transform.MegaPhase.transformUnnamed$1(MegaPhase.scala:298)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:427)
at dotty.tools.dotc.transform.MegaPhase.mapDefDef$1(MegaPhase.scala:248)
at dotty.tools.dotc.transform.MegaPhase.transformNamed$1(MegaPhase.scala:251)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:425)
at dotty.tools.dotc.transform.MegaPhase.loop$1(MegaPhase.scala:438)
at dotty.tools.dotc.transform.MegaPhase.transformStats(MegaPhase.scala:438)
at dotty.tools.dotc.transform.MegaPhase.transformUnnamed$1(MegaPhase.scala:359)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:427)
at dotty.tools.dotc.transform.MegaPhase.transformNamed$1(MegaPhase.scala:255)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:425)
at dotty.tools.dotc.transform.MegaPhase.loop$1(MegaPhase.scala:438)
at dotty.tools.dotc.transform.MegaPhase.transformStats(MegaPhase.scala:438)
at dotty.tools.dotc.transform.MegaPhase.mapPackage$1(MegaPhase.scala:379)
at dotty.tools.dotc.transform.MegaPhase.transformUnnamed$1(MegaPhase.scala:382)
at dotty.tools.dotc.transform.MegaPhase.transformTree(MegaPhase.scala:427)
at dotty.tools.dotc.transform.MegaPhase.transformUnit(MegaPhase.scala:454)
at dotty.tools.dotc.transform.MegaPhase.run(MegaPhase.scala:466)
at dotty.tools.dotc.transform.MegaPhase$MiniPhase.run(MegaPhase.scala:131)
at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:311)
at scala.collection.immutable.List.map(List.scala:246)
at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:312)
at dotty.tools.dotc.Run.runPhases$1$$anonfun$1(Run.scala:234)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1328)
at dotty.tools.dotc.Run.runPhases$1(Run.scala:245)
at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:253)
at dotty.tools.dotc.Run.compileUnits$$anonfun$adapted$1(Run.scala:262)
at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:68)
at dotty.tools.dotc.Run.compileUnits(Run.scala:262)
at dotty.tools.dotc.Run.compileSources(Run.scala:186)
at dotty.tools.dotc.Run.compile(Run.scala:170)
at dotty.tools.dotc.Driver.doCompile(Driver.scala:35)
at dotty.tools.dotc.Driver.process(Driver.scala:195)
at dotty.tools.dotc.Driver.process(Driver.scala:163)
at dotty.tools.dotc.Driver.process(Driver.scala:175)
at dotty.tools.dotc.Driver.main(Driver.scala:205)
at dotty.tools.dotc.Main.main(Main.scala)
java.lang.AssertionError: assertion failed: asTerm called on not-a-Termval<none>while compiling tests/run/i13332shapeless-c.scala
The text was updated successfully, but these errors were encountered:
This is similar to code that would be generated for a Mirror - but I am using plain code to demonstrate that the problem is not to do with mirror synthesis itself.
derived from a shapeless test case at https://github.com/milessabin/shapeless/blob/ae9fc166082adb3fa590a604b256c9e87a467c56/core/src/test/scala/shapeless/generic.scala#L903
The crucial part is apparently the implementation of
M_Rgb
, and that it referencesTRgb
- aka result of a match type.If I replace
TRgb
byInner.Rgb
then it works.Compiler version
3.2.1-RC1-bin-20220805-e560c2d-NIGHTLY
Minimized code
Output (click arrow to expand)
The text was updated successfully, but these errors were encountered: