Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assertion failed: <notype> class dotty.tools.dotc.ast.Trees$TypeTree -1 in ReTyper #13406

Closed
joroKr21 opened this issue Aug 27, 2021 · 14 comments · Fixed by #14405
Closed

assertion failed: <notype> class dotty.tools.dotc.ast.Trees$TypeTree -1 in ReTyper #13406

joroKr21 opened this issue Aug 27, 2021 · 14 comments · Fixed by #14405
Assignees
Labels
itype:bug itype:crash regression This worked in a previous version but doesn't anymore
Milestone

Comments

@joroKr21
Copy link
Member

Compiler version

3.0.2-RC2

Minimized code

Reproducer: typelevel/kittens#376
The issue is in ReducibleSuite.

Output (click arrow to expand)

[error] java.lang.AssertionError: assertion failed: <notype> class dotty.tools.dotc.ast.Trees$TypeTree -1
[error] 	at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
[error] 	at dotty.tools.dotc.typer.ReTyper.assertTyped(ReTyper.scala:29)
[error] 	at dotty.tools.dotc.typer.ReTyper.promote(ReTyper.scala:33)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedTypeTree(ReTyper.scala:69)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedTypeTree(ReTyper.scala:68)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2716)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Typer.typedType(Typer.scala:2943)
[error] 	at dotty.tools.dotc.typer.Namer.typedAheadType$$anonfun$1(Namer.scala:1421)
[error] 	at dotty.tools.dotc.typer.Namer.typedAhead(Namer.scala:1414)
[error] 	at dotty.tools.dotc.typer.Namer.typedAheadType(Namer.scala:1421)
[error] 	at dotty.tools.dotc.typer.Namer.defDefSig(Namer.scala:1551)
[error] 	at dotty.tools.dotc.typer.Namer$Completer.typeSig(Namer.scala:755)
[error] 	at dotty.tools.dotc.typer.Namer$Completer.completeInCreationContext(Namer.scala:887)
[error] 	at dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:779)
[error] 	at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:167)
[error] 	at dotty.tools.dotc.core.Denotations$Denotation.completeInfo$1(Denotations.scala:188)
[error] 	at dotty.tools.dotc.core.Denotations$Denotation.info(Denotations.scala:190)
[error] 	at dotty.tools.dotc.typer.Namer$ClassCompleter.completeConstructor(Namer.scala:1238)
[error] 	at dotty.tools.dotc.typer.Namer$ClassCompleter.completeInCreationContext(Namer.scala:1354)
[error] 	at dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:779)
[error] 	at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:167)
[error] 	at dotty.tools.dotc.core.Denotations$Denotation.completeInfo$1(Denotations.scala:188)
[error] 	at dotty.tools.dotc.core.Denotations$Denotation.info(Denotations.scala:190)
[error] 	at dotty.tools.dotc.core.SymDenotations$SymDenotation.ensureCompleted(SymDenotations.scala:369)
[error] 	at dotty.tools.dotc.typer.Typer.retrieveSym(Typer.scala:2635)
[error] 	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2660)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2755)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:2847)
[error] 	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:2897)
[error] 	at dotty.tools.dotc.typer.Typer.typedBlockStats(Typer.scala:1025)
[error] 	at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:1029)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2701)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Typer.typedNew(Typer.scala:780)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2697)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Synthesizer.anonymousMirror(Synthesizer.scala:191)
[error] 	at dotty.tools.dotc.typer.Synthesizer.sumMirror(Synthesizer.scala:338)
[error] 	at dotty.tools.dotc.typer.Synthesizer.$init$$$anonfun$16$$anonfun$1$$anonfun$1$$anonfun$1(Synthesizer.scala:362)
[error] 	at dotty.tools.dotc.typer.Synthesizer.makeMirror(Synthesizer.scala:348)
[error] 	at dotty.tools.dotc.typer.Synthesizer.$init$$$anonfun$19$$anonfun$4(Synthesizer.scala:362)
[error] 	at dotty.tools.dotc.typer.Synthesizer.recur$1(Synthesizer.scala:399)
[error] 	at dotty.tools.dotc.typer.Synthesizer.tryAll(Synthesizer.scala:404)
[error] 	at dotty.tools.dotc.typer.Implicits.inferImplicitArg(Implicits.scala:854)
[error] 	at dotty.tools.dotc.typer.Implicits.inferImplicitArg$(Implicits.scala:774)
[error] 	at dotty.tools.dotc.typer.Typer.inferImplicitArg(Typer.scala:106)
[error] 	at dotty.tools.dotc.typer.Typer.implicitArgs$1(Typer.scala:3284)
[error] 	at dotty.tools.dotc.typer.Typer.addImplicitArgs$3(Typer.scala:3320)
[error] 	at dotty.tools.dotc.typer.Typer.adaptNoArgsImplicitMethod$2(Typer.scala:3400)
[error] 	at dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:3597)
[error] 	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3810)
[error] 	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3162)
[error] 	at dotty.tools.dotc.typer.Typer.readapt$1(Typer.scala:3173)
[error] 	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3797)
[error] 	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3162)
[error] 	at dotty.tools.dotc.typer.Implicits.typedImplicit(Implicits.scala:1042)
[error] 	at dotty.tools.dotc.typer.Implicits.typedImplicit$(Implicits.scala:774)
[error] 	at dotty.tools.dotc.typer.Typer.typedImplicit(Typer.scala:106)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.tryImplicit(Implicits.scala:1138)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.rank$1(Implicits.scala:1217)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1385)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1392)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1400)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.bestImplicit(Implicits.scala:1425)
[error] 	at dotty.tools.dotc.typer.Implicits.inferImplicit(Implicits.scala:991)
[error] 	at dotty.tools.dotc.typer.Implicits.inferImplicit$(Implicits.scala:774)
[error] 	at dotty.tools.dotc.typer.Typer.inferImplicit(Typer.scala:106)
[error] 	at dotty.tools.dotc.typer.Implicits.ignoredInstanceNormalImport$1(Implicits.scala:882)
[error] 	at dotty.tools.dotc.typer.Implicits.$anonfun$1(Implicits.scala:896)
[error] 	at dotty.tools.dotc.typer.ImplicitSearchError.hiddenImplicitsAddendum(ErrorReporting.scala:419)
[error] 	at dotty.tools.dotc.typer.ImplicitSearchError.missingArgMsg(ErrorReporting.scala:267)
[error] 	at dotty.tools.dotc.typer.Implicits.missingArgMsg(Implicits.scala:897)
[error] 	at dotty.tools.dotc.typer.Implicits.missingArgMsg$(Implicits.scala:774)
[error] 	at dotty.tools.dotc.typer.Typer.missingArgMsg(Typer.scala:106)
[error] 	at dotty.tools.dotc.typer.Inliner.searchImplicit$1(Inliner.scala:837)
[error] 	at dotty.tools.dotc.typer.Inliner.inlined(Inliner.scala:841)
[error] 	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.inlineIfNeeded(Inliner.scala:1618)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedTypeApply(Inliner.scala:1549)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2712)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.ProtoTypes$FunProto.$anonfun$5(ProtoTypes.scala:428)
[error] 	at dotty.tools.dotc.typer.ProtoTypes$FunProto.cacheTypedArg(ProtoTypes.scala:359)
[error] 	at dotty.tools.dotc.typer.ProtoTypes$FunProto.typedArg(ProtoTypes.scala:429)
[error] 	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:850)
[error] 	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:850)
[error] 	at dotty.tools.dotc.typer.Applications$Application.addTyped$1(Applications.scala:544)
[error] 	at dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:609)
[error] 	at dotty.tools.dotc.typer.Applications$Application.init(Applications.scala:447)
[error] 	at dotty.tools.dotc.typer.Applications$TypedApply.<init>(Applications.scala:735)
[error] 	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.<init>(Applications.scala:849)
[error] 	at dotty.tools.dotc.typer.Applications.ApplyTo(Applications.scala:1057)
[error] 	at dotty.tools.dotc.typer.Applications.ApplyTo$(Applications.scala:317)
[error] 	at dotty.tools.dotc.typer.Typer.ApplyTo(Typer.scala:106)
[error] 	at dotty.tools.dotc.typer.Applications.simpleApply$1(Applications.scala:904)
[error] 	at dotty.tools.dotc.typer.Applications.realApply$5$$anonfun$4(Applications.scala:983)
[error] 	at dotty.tools.dotc.typer.Typer.tryEither(Typer.scala:2949)
[error] 	at dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:994)
[error] 	at dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:1032)
[error] 	at dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:317)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedApply(Inliner.scala:1535)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2693)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2941)
[error] 	at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:1031)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2701)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedTyped(ReTyper.scala:62)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2698)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2818)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Inliner.inlined(Inliner.scala:1016)
[error] 	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.inlineIfNeeded(Inliner.scala:1618)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedTypeApply(Inliner.scala:1549)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2712)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedTyped(ReTyper.scala:62)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2698)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2818)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Inliner.inlined(Inliner.scala:1016)
[error] 	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
[error] 	at dotty.tools.dotc.typer.Typer.adaptNoArgsOther$4(Typer.scala:3503)
[error] 	at dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:3619)
[error] 	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3810)
[error] 	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3162)
[error] 	at dotty.tools.dotc.typer.Typer.readapt$1(Typer.scala:3173)
[error] 	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3797)
[error] 	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3162)
[error] 	at dotty.tools.dotc.typer.Implicits.typedImplicit(Implicits.scala:1042)
[error] 	at dotty.tools.dotc.typer.Implicits.typedImplicit$(Implicits.scala:774)
[error] 	at dotty.tools.dotc.typer.Typer.typedImplicit(Typer.scala:106)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.tryImplicit(Implicits.scala:1138)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.rank$1(Implicits.scala:1217)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1385)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1392)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.bestImplicit(Implicits.scala:1425)
[error] 	at dotty.tools.dotc.typer.Implicits.inferImplicit(Implicits.scala:991)
[error] 	at dotty.tools.dotc.typer.Implicits.inferImplicit$(Implicits.scala:774)
[error] 	at dotty.tools.dotc.typer.Typer.inferImplicit(Typer.scala:106)
[error] 	at dotty.tools.dotc.typer.Implicits.inferImplicitArg(Implicits.scala:848)
[error] 	at dotty.tools.dotc.typer.Implicits.inferImplicitArg$(Implicits.scala:774)
[error] 	at dotty.tools.dotc.typer.Typer.inferImplicitArg(Typer.scala:106)
[error] 	at dotty.tools.dotc.typer.Inliner.dotty$tools$dotc$typer$Inliner$reducer$$$_$searchImplicit$2(Inliner.scala:1280)
[error] 	at dotty.tools.dotc.typer.Inliner$reducer$.reducePattern$1(Inliner.scala:1358)
[error] 	at dotty.tools.dotc.typer.Inliner$reducer$.reduceCase$1(Inliner.scala:1439)
[error] 	at dotty.tools.dotc.typer.Inliner$reducer$.recur$2(Inliner.scala:1455)
[error] 	at dotty.tools.dotc.typer.Inliner$reducer$.reduceInlineMatch(Inliner.scala:1458)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedMatchFinish(Inliner.scala:1571)
[error] 	at dotty.tools.dotc.typer.Typer.typedMatch(Typer.scala:1468)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedMatch(Inliner.scala:1558)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2707)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedTyped(ReTyper.scala:62)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2698)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2818)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Inliner.inlined(Inliner.scala:1016)
[error] 	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
[error] 	at dotty.tools.dotc.typer.Typer.adaptNoArgsOther$4(Typer.scala:3503)
[error] 	at dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:3619)
[error] 	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3810)
[error] 	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3162)
[error] 	at dotty.tools.dotc.typer.Typer.readapt$1(Typer.scala:3173)
[error] 	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3797)
[error] 	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3162)
[error] 	at dotty.tools.dotc.typer.Implicits.typedImplicit(Implicits.scala:1042)
[error] 	at dotty.tools.dotc.typer.Implicits.typedImplicit$(Implicits.scala:774)
[error] 	at dotty.tools.dotc.typer.Typer.typedImplicit(Typer.scala:106)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.tryImplicit(Implicits.scala:1138)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.rank$1(Implicits.scala:1217)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1385)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1392)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1400)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.bestImplicit(Implicits.scala:1425)
[error] 	at dotty.tools.dotc.typer.Implicits.inferImplicit(Implicits.scala:991)
[error] 	at dotty.tools.dotc.typer.Implicits.inferImplicit$(Implicits.scala:774)
[error] 	at dotty.tools.dotc.typer.Typer.inferImplicit(Typer.scala:106)
[error] 	at dotty.tools.dotc.typer.Implicits.inferImplicitArg(Implicits.scala:848)
[error] 	at dotty.tools.dotc.typer.Implicits.inferImplicitArg$(Implicits.scala:774)
[error] 	at dotty.tools.dotc.typer.Typer.inferImplicitArg(Typer.scala:106)
[error] 	at dotty.tools.dotc.typer.Inliner.searchImplicit$1(Inliner.scala:834)
[error] 	at dotty.tools.dotc.typer.Inliner.inlined(Inliner.scala:841)
[error] 	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.inlineIfNeeded(Inliner.scala:1618)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedTypeApply(Inliner.scala:1549)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2712)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.ProtoTypes$FunProto.$anonfun$5(ProtoTypes.scala:428)
[error] 	at dotty.tools.dotc.typer.ProtoTypes$FunProto.cacheTypedArg(ProtoTypes.scala:359)
[error] 	at dotty.tools.dotc.typer.ProtoTypes$FunProto.typedArg(ProtoTypes.scala:429)
[error] 	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:850)
[error] 	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:850)
[error] 	at dotty.tools.dotc.typer.Applications$Application.addTyped$1(Applications.scala:544)
[error] 	at dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:609)
[error] 	at dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:609)
[error] 	at dotty.tools.dotc.typer.Applications$Application.init(Applications.scala:447)
[error] 	at dotty.tools.dotc.typer.Applications$TypedApply.<init>(Applications.scala:735)
[error] 	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.<init>(Applications.scala:849)
[error] 	at dotty.tools.dotc.typer.Applications.ApplyTo(Applications.scala:1057)
[error] 	at dotty.tools.dotc.typer.Applications.ApplyTo$(Applications.scala:317)
[error] 	at dotty.tools.dotc.typer.Typer.ApplyTo(Typer.scala:106)
[error] 	at dotty.tools.dotc.typer.Applications.simpleApply$1(Applications.scala:904)
[error] 	at dotty.tools.dotc.typer.Applications.realApply$5$$anonfun$4(Applications.scala:983)
[error] 	at dotty.tools.dotc.typer.Typer.tryEither(Typer.scala:2949)
[error] 	at dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:994)
[error] 	at dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:1032)
[error] 	at dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:317)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedApply(Inliner.scala:1535)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2693)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:2874)
[error] 	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:2897)
[error] 	at dotty.tools.dotc.typer.Typer.typedBlockStats(Typer.scala:1025)
[error] 	at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:1029)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2701)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2941)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedMatchFinish(Inliner.scala:1593)
[error] 	at dotty.tools.dotc.typer.Typer.typedMatch(Typer.scala:1527)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedMatch(Inliner.scala:1558)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2707)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedTyped(ReTyper.scala:62)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2698)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Inliner.inlined(Inliner.scala:1016)
[error] 	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.inlineIfNeeded(Inliner.scala:1618)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedApply(Inliner.scala:1542)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2693)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2941)
[error] 	at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:1031)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2701)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2941)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedMatchFinish(Inliner.scala:1593)
[error] 	at dotty.tools.dotc.typer.Typer.typedMatch(Typer.scala:1527)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedMatch(Inliner.scala:1558)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2707)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedTyped(ReTyper.scala:62)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2698)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Inliner.inlined(Inliner.scala:1016)
[error] 	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.inlineIfNeeded(Inliner.scala:1618)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedApply(Inliner.scala:1542)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2693)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedTyped(ReTyper.scala:62)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2698)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2818)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Inliner.inlined(Inliner.scala:1016)
[error] 	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.inlineIfNeeded(Inliner.scala:1618)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedTypeApply(Inliner.scala:1549)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2712)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.ProtoTypes$FunProto.$anonfun$5(ProtoTypes.scala:428)
[error] 	at dotty.tools.dotc.typer.ProtoTypes$FunProto.cacheTypedArg(ProtoTypes.scala:359)
[error] 	at dotty.tools.dotc.typer.ProtoTypes$FunProto.typedArg(ProtoTypes.scala:429)
[error] 	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:850)
[error] 	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:850)
[error] 	at dotty.tools.dotc.typer.Applications$Application.addTyped$1(Applications.scala:544)
[error] 	at dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:609)
[error] 	at dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:609)
[error] 	at dotty.tools.dotc.typer.Applications$Application.init(Applications.scala:447)
[error] 	at dotty.tools.dotc.typer.Applications$TypedApply.<init>(Applications.scala:735)
[error] 	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.<init>(Applications.scala:849)
[error] 	at dotty.tools.dotc.typer.Applications.ApplyTo(Applications.scala:1057)
[error] 	at dotty.tools.dotc.typer.Applications.ApplyTo$(Applications.scala:317)
[error] 	at dotty.tools.dotc.typer.Typer.ApplyTo(Typer.scala:106)
[error] 	at dotty.tools.dotc.typer.Applications.simpleApply$1(Applications.scala:904)
[error] 	at dotty.tools.dotc.typer.Applications.realApply$5$$anonfun$4(Applications.scala:983)
[error] 	at dotty.tools.dotc.typer.Typer.tryEither(Typer.scala:2949)
[error] 	at dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:994)
[error] 	at dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:1032)
[error] 	at dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:317)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedApply(Inliner.scala:1535)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2693)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2941)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedMatchFinish(Inliner.scala:1593)
[error] 	at dotty.tools.dotc.typer.Typer.typedMatch(Typer.scala:1527)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedMatch(Inliner.scala:1558)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2707)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedTyped(ReTyper.scala:62)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2698)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2818)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Inliner.inlined(Inliner.scala:1016)
[error] 	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.inlineIfNeeded(Inliner.scala:1618)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedApply(Inliner.scala:1542)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2693)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedTyped(ReTyper.scala:62)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2698)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2818)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Inliner.inlined(Inliner.scala:1016)
[error] 	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.inlineIfNeeded(Inliner.scala:1618)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedApply(Inliner.scala:1542)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2693)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.ProtoTypes$FunProto.$anonfun$5(ProtoTypes.scala:428)
[error] 	at dotty.tools.dotc.typer.ProtoTypes$FunProto.cacheTypedArg(ProtoTypes.scala:359)
[error] 	at dotty.tools.dotc.typer.ProtoTypes$FunProto.typedArg(ProtoTypes.scala:429)
[error] 	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:850)
[error] 	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:850)
[error] 	at dotty.tools.dotc.typer.Applications$Application.addTyped$1(Applications.scala:544)
[error] 	at dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:609)
[error] 	at dotty.tools.dotc.typer.Applications$Application.init(Applications.scala:447)
[error] 	at dotty.tools.dotc.typer.Applications$TypedApply.<init>(Applications.scala:735)
[error] 	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.<init>(Applications.scala:849)
[error] 	at dotty.tools.dotc.typer.Applications.ApplyTo(Applications.scala:1057)
[error] 	at dotty.tools.dotc.typer.Applications.ApplyTo$(Applications.scala:317)
[error] 	at dotty.tools.dotc.typer.Typer.ApplyTo(Typer.scala:106)
[error] 	at dotty.tools.dotc.typer.Applications.simpleApply$1(Applications.scala:904)
[error] 	at dotty.tools.dotc.typer.Applications.realApply$5$$anonfun$4(Applications.scala:983)
[error] 	at dotty.tools.dotc.typer.Typer.tryEither(Typer.scala:2949)
[error] 	at dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:994)
[error] 	at dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:1032)
[error] 	at dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:317)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedApply(Inliner.scala:1535)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2693)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedTyped(ReTyper.scala:62)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2698)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Inliner.inlined(Inliner.scala:1016)
[error] 	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
[error] 	at dotty.tools.dotc.typer.Typer.adaptNoArgsOther$4(Typer.scala:3503)
[error] 	at dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:3619)
[error] 	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3810)
[error] 	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3162)
[error] 	at dotty.tools.dotc.typer.Typer.readapt$1(Typer.scala:3173)
[error] 	at dotty.tools.dotc.typer.Typer.readaptSimplified$1(Typer.scala:3174)
[error] 	at dotty.tools.dotc.typer.Typer.addImplicitArgs$3(Typer.scala:3391)
[error] 	at dotty.tools.dotc.typer.Typer.adaptNoArgsImplicitMethod$2(Typer.scala:3400)
[error] 	at dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:3597)
[error] 	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3810)
[error] 	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3162)
[error] 	at dotty.tools.dotc.typer.Typer.readapt$1(Typer.scala:3173)
[error] 	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3797)
[error] 	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3162)
[error] 	at dotty.tools.dotc.typer.Implicits.typedImplicit(Implicits.scala:1042)
[error] 	at dotty.tools.dotc.typer.Implicits.typedImplicit$(Implicits.scala:774)
[error] 	at dotty.tools.dotc.typer.Typer.typedImplicit(Typer.scala:106)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.tryImplicit(Implicits.scala:1138)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.rank$1(Implicits.scala:1217)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1385)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1392)
[error] 	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.bestImplicit(Implicits.scala:1425)
[error] 	at dotty.tools.dotc.typer.Implicits.inferImplicit(Implicits.scala:991)
[error] 	at dotty.tools.dotc.typer.Implicits.inferImplicit$(Implicits.scala:774)
[error] 	at dotty.tools.dotc.typer.Typer.inferImplicit(Typer.scala:106)
[error] 	at dotty.tools.dotc.typer.Implicits.inferImplicitArg(Implicits.scala:848)
[error] 	at dotty.tools.dotc.typer.Implicits.inferImplicitArg$(Implicits.scala:774)
[error] 	at dotty.tools.dotc.typer.Typer.inferImplicitArg(Typer.scala:106)
[error] 	at dotty.tools.dotc.typer.Inliner.searchImplicit$1(Inliner.scala:834)
[error] 	at dotty.tools.dotc.typer.Inliner.inlined(Inliner.scala:841)
[error] 	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.inlineIfNeeded(Inliner.scala:1618)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedTypeApply(Inliner.scala:1549)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2712)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.ProtoTypes$FunProto.$anonfun$5(ProtoTypes.scala:428)
[error] 	at dotty.tools.dotc.typer.ProtoTypes$FunProto.cacheTypedArg(ProtoTypes.scala:359)
[error] 	at dotty.tools.dotc.typer.ProtoTypes$FunProto.typedArg(ProtoTypes.scala:429)
[error] 	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:850)
[error] 	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:850)
[error] 	at dotty.tools.dotc.typer.Applications$Application.addTyped$1(Applications.scala:544)
[error] 	at dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:609)
[error] 	at dotty.tools.dotc.typer.Applications$Application.init(Applications.scala:447)
[error] 	at dotty.tools.dotc.typer.Applications$TypedApply.<init>(Applications.scala:735)
[error] 	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.<init>(Applications.scala:849)
[error] 	at dotty.tools.dotc.typer.Applications.ApplyTo(Applications.scala:1057)
[error] 	at dotty.tools.dotc.typer.Applications.ApplyTo$(Applications.scala:317)
[error] 	at dotty.tools.dotc.typer.Typer.ApplyTo(Typer.scala:106)
[error] 	at dotty.tools.dotc.typer.Applications.simpleApply$1(Applications.scala:904)
[error] 	at dotty.tools.dotc.typer.Applications.realApply$5$$anonfun$4(Applications.scala:983)
[error] 	at dotty.tools.dotc.typer.Typer.tryEither(Typer.scala:2949)
[error] 	at dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:994)
[error] 	at dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:1032)
[error] 	at dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:317)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedApply(Inliner.scala:1535)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2693)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2941)
[error] 	at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:1031)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2701)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedTyped(ReTyper.scala:62)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2698)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2818)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Inliner.inlined(Inliner.scala:1016)
[error] 	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.inlineIfNeeded(Inliner.scala:1618)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedTypeApply(Inliner.scala:1549)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2712)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedTyped(ReTyper.scala:62)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2698)
[error] 	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
[error] 	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
[error] 	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedUnadapted(Inliner.scala:1622)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2821)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2818)
[error] 	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
[error] 	at dotty.tools.dotc.typer.Inliner.inlined(Inliner.scala:1016)
[error] 	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
[error] 	at dotty.tools.dotc.transform.Inlining$InliningTreeMap.transform(Inlining.scala:86)
[error] 	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform$$anonfun$1(Trees.scala:1490)
[error] 	at scala.collection.immutable.List.mapConserve(List.scala:472)
[error] 	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1490)
[error] 	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1386)
[error] 	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
[error] 	at dotty.tools.dotc.transform.Inlining$InliningTreeMap.transform(Inlining.scala:94)
[error] 	at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:53)
[error] 	at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
[error] 	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:93)
[error] 	at dotty.tools.dotc.transform.Inlining$InliningTreeMap.transform(Inlining.scala:82)
[error] 	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform$$anonfun$1(Trees.scala:1490)
[error] 	at scala.collection.immutable.List.mapConserve(List.scala:472)
[error] 	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1490)
[error] 	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1386)
[error] 	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
[error] 	at dotty.tools.dotc.transform.Inlining$InliningTreeMap.transform(Inlining.scala:94)
[error] 	at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:53)
[error] 	at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
[error] 	at dotty.tools.dotc.ast.TreeMapWithImplicits.recur$1(TreeMapWithImplicits.scala:35)
[error] 	at dotty.tools.dotc.ast.TreeMapWithImplicits.recur$1(TreeMapWithImplicits.scala:41)
[error] 	at dotty.tools.dotc.ast.TreeMapWithImplicits.recur$1(TreeMapWithImplicits.scala:41)
[error] 	at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:54)
[error] 	at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
[error] 	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:111)
[error] 	at dotty.tools.dotc.transform.Inlining$InliningTreeMap.transform(Inlining.scala:80)
[error] 	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1463)
[error] 	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
[error] 	at dotty.tools.dotc.transform.Inlining$InliningTreeMap.transform(Inlining.scala:80)
[error] 	at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:53)
[error] 	at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
[error] 	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1474)
[error] 	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
[error] 	at dotty.tools.dotc.transform.Inlining$InliningTreeMap.transform(Inlining.scala:94)
[error] 	at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:53)
[error] 	at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
[error] 	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1474)
[error] 	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
[error] 	at dotty.tools.dotc.transform.Inlining$InliningTreeMap.transform(Inlining.scala:94)
[error] 	at dotty.tools.dotc.transform.Inlining$$anon$2.transform(Inlining.scala:72)
[error] 	at dotty.tools.dotc.transform.MacroTransform.run(MacroTransform.scala:21)
[error] 	at dotty.tools.dotc.transform.Inlining.run(Inlining.scala:44)
[error] 	at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:303)
[error] 	at scala.collection.immutable.List.map(List.scala:250)
[error] 	at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:304)
[error] 	at dotty.tools.dotc.transform.Inlining.runOn(Inlining.scala:48)
[error] 	at dotty.tools.dotc.Run.runPhases$4$$anonfun$4(Run.scala:205)
[error] 	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
[error] 	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
[error] 	at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1323)
[error] 	at dotty.tools.dotc.Run.runPhases$5(Run.scala:216)
[error] 	at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:224)
[error] 	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
[error] 	at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:67)
[error] 	at dotty.tools.dotc.Run.compileUnits(Run.scala:231)
[error] 	at dotty.tools.dotc.Run.compileSources(Run.scala:166)
[error] 	at dotty.tools.dotc.Run.compile(Run.scala:150)
[error] 	at dotty.tools.dotc.Driver.doCompile(Driver.scala:39)
[error] 	at dotty.tools.xsbt.CompilerBridgeDriver.run(CompilerBridgeDriver.java:88)
[error] 	at dotty.tools.xsbt.CompilerBridge.run(CompilerBridge.java:22)
[error] 	at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:91)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$7(MixedAnalyzingCompiler.scala:186)
[error] 	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:241)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4(MixedAnalyzingCompiler.scala:176)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4$adapted(MixedAnalyzingCompiler.scala:157)
[error] 	at sbt.internal.inc.JarUtils$.withPreviousJar(JarUtils.scala:239)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:157)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:204)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1(IncrementalCompilerImpl.scala:528)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1$adapted(IncrementalCompilerImpl.scala:528)
[error] 	at sbt.internal.inc.Incremental$.$anonfun$apply$5(Incremental.scala:174)
[error] 	at sbt.internal.inc.Incremental$.$anonfun$apply$5$adapted(Incremental.scala:172)
[error] 	at sbt.internal.inc.Incremental$$anon$2.run(Incremental.scala:457)
[error] 	at sbt.internal.inc.IncrementalCommon$CycleState.next(IncrementalCommon.scala:116)
[error] 	at sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:56)
[error] 	at sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:52)
[error] 	at sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:261)
[error] 	at sbt.internal.inc.Incremental$.$anonfun$incrementalCompile$8(Incremental.scala:412)
[error] 	at sbt.internal.inc.Incremental$.withClassfileManager(Incremental.scala:499)
[error] 	at sbt.internal.inc.Incremental$.incrementalCompile(Incremental.scala:399)
[error] 	at sbt.internal.inc.Incremental$.apply(Incremental.scala:166)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:528)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:482)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:332)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:420)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:137)
[error] 	at sbt.Defaults$.compileIncrementalTaskImpl(Defaults.scala:2362)
[error] 	at sbt.Defaults$.$anonfun$compileIncrementalTask$2(Defaults.scala:2319)
[error] 	at sbt.internal.io.Retry$.apply(Retry.scala:46)
[error] 	at sbt.internal.io.Retry$.apply(Retry.scala:28)
[error] 	at sbt.internal.io.Retry$.apply(Retry.scala:23)
[error] 	at sbt.internal.server.BspCompileTask$.compute(BspCompileTask.scala:31)
[error] 	at sbt.Defaults$.$anonfun$compileIncrementalTask$1(Defaults.scala:2315)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] 	at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] 	at sbt.Execute.work(Execute.scala:291)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] 	at java.lang.Thread.run(Thread.java:748)
@prolativ
Copy link
Contributor

@joroKr21 could you try to minimize it without a reference to an external repository?

@joroKr21
Copy link
Member Author

That's unlikely - the project has a very similar FoldableSuite that doesn't exhibit the problem

@joroKr21
Copy link
Member Author

@prolativ this is a regression from 3.0.1

@nicolasstucki nicolasstucki added the stat:needs minimization Needs a self contained minimization label Aug 30, 2021
@griggt
Copy link
Contributor

griggt commented Sep 4, 2021

Reduced to the following self-contained example. Further minimization may be possible.

foo.scala

// This file must be compiled with Scala 2.13
case class Foo[A](x: A)

derived.scala

import scala.compiletime.summonFrom

opaque type Derived[A] = A
object Derived:
  def apply[A](instance: A): Derived[A] = instance
  extension [A](derived: Derived[A]) def instance: A = derived

  opaque type Or[A] = A
  object Or extends OrInstances:
    def apply[A](instance: A): Or[A] = instance
    extension [A](or: Or[A]) def unify: A = or

sealed abstract class OrInstances:
  inline given [A]: Derived.Or[A] = summonFrom {
    case instance: A => Derived.Or(instance)
    case derived: Derived[A] => Derived.Or(derived.instance)
  }

reducible.scala

import scala.compiletime._

trait Reducible[F[_]]
object Reducible:
  given Reducible[Foo] = ???

type DerivedReducible[F[_]] = Derived[Reducible[F]]
object DerivedReducible:
  type Or[F[_]] = Derived.Or[Reducible[F]]

  inline def apply[F[_]]: Reducible[F] =
    import DerivedReducible.given
    summonInline[DerivedReducible[F]].instance

  def product[F[_]](ev: Reducible[?]): DerivedReducible[F] = ???

  inline given [F[_]](using gen: K1.ProductGeneric[F]): DerivedReducible[F] =
    product(K1.summonFirst[Or, gen.MirroredElemTypes, Const[Any]].unify)

  given [F[_]](using inst: => K1.CoproductInstances[Or, F]): DerivedReducible[F] = ???

extension (F: Reducible.type)
  inline def derived[F[_]]: Reducible[F] = DerivedReducible[F]

case class Bar[A](v: A)
case class FooAndBar[A](foo: Foo[A], bar: Bar[A])
object Test:
  inline given [F[_]]: Reducible[F] = DerivedReducible[F]
  summon[Reducible[FooAndBar]]

// all code below is extracted from shapeless3-deriving
import scala.deriving.Mirror

type Const[c] = [t] =>> c

object K1 {
  type Kind[C, O[_]] = C {
    type Kind = K1.type
    type MirroredType[X] = O[X]
    type MirroredMonoType = O[Any]
    type MirroredElemTypes[_] <: Tuple
  }

  type ProductGeneric[O[_]] = Kind[Mirror.Product, O]
  type CoproductGeneric[O[_]] = Kind[Mirror.Sum, O]
  type CoproductInstances[F[_[_]], T[_]] = ErasedCoproductInstances[K1.type, F[T]]

  type Head[T <: [X] =>> Any, A] = T[A] match { case h *: t => h }
  type Tail[T <: [X] =>> Any, A] = T[A] match { case h *: t => t }

  type LiftP[F[_[_]], T <: [X] =>> Any] <: Tuple =
    T[Any] match {
      case _ *: _ => F[[X] =>> Head[T, X]] *: LiftP[F, [X] =>> Tail[T, X]]
      case _ => EmptyTuple
    }

  inline def summonFirst[F[_[_]], T[_], U[_]]: F[U] = summonFirst0[LiftP[F, T]].asInstanceOf[F[U]]

  transparent inline def summonFirst0[T]: Any = inline erasedValue[T] match {
    case _: (a *: b) => summonFrom {
      case aa: `a` => aa
      case _ => summonFirst0[b]
    }
  }
}

final class ErasedCoproductInstances[K, FT](mirror: Mirror.Sum, is0: => Array[Any])
object ErasedCoproductInstances {
  inline def apply[K, FT, E <: Tuple](mirror: Mirror.Sum) : ErasedCoproductInstances[K, FT] =
    new ErasedCoproductInstances[K, FT](mirror, summonAsArray[E])
}

inline def summonAsArray[T <: Tuple]: Array[Any] =
  summonAsArray0[T](0, new Array[Any](constValue[Tuple.Size[T]]))

inline def summonAsArray0[T](i: Int, arr: Array[Any]): Array[Any] = inline erasedValue[T] match {
  case _: EmptyTuple => arr
  case _: (a *: b) =>
    arr(i) = summonInline[a]
    summonAsArray0[b](i+1, arr)
}

Compilation Output

$ scalac -2.13.6 foo.scala
$ scalac -3.0.2 derived.scala reducible.scala
exception occurred while compiling derived.scala, reducible.scala
java.lang.AssertionError: assertion failed: <notype> class dotty.tools.dotc.ast.Trees$TypeTree -1 while compiling derived.scala, reducible.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: <notype> class dotty.tools.dotc.ast.Trees$TypeTree -1
	at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
	at dotty.tools.dotc.typer.ReTyper.assertTyped(ReTyper.scala:29)
	at dotty.tools.dotc.typer.ReTyper.promote(ReTyper.scala:33)
	at dotty.tools.dotc.typer.ReTyper.typedTypeTree(ReTyper.scala:69)
	at dotty.tools.dotc.typer.ReTyper.typedTypeTree(ReTyper.scala:68)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2716)
	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.typedType(Typer.scala:2943)
	at dotty.tools.dotc.typer.Namer.typedAheadType$$anonfun$1(Namer.scala:1421)
	at dotty.tools.dotc.typer.Namer.typedAhead(Namer.scala:1414)
	at dotty.tools.dotc.typer.Namer.typedAheadType(Namer.scala:1421)
	at dotty.tools.dotc.typer.Namer.defDefSig(Namer.scala:1551)
	at dotty.tools.dotc.typer.Namer$Completer.typeSig(Namer.scala:755)
	at dotty.tools.dotc.typer.Namer$Completer.completeInCreationContext(Namer.scala:887)
	at dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:779)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:167)
	at dotty.tools.dotc.core.Denotations$Denotation.completeInfo$1(Denotations.scala:188)
	at dotty.tools.dotc.core.Denotations$Denotation.info(Denotations.scala:190)
	at dotty.tools.dotc.typer.Namer$ClassCompleter.completeConstructor(Namer.scala:1238)
	at dotty.tools.dotc.typer.Namer$ClassCompleter.completeInCreationContext(Namer.scala:1354)
	at dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:779)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:167)
	at dotty.tools.dotc.core.Denotations$Denotation.completeInfo$1(Denotations.scala:188)
	at dotty.tools.dotc.core.Denotations$Denotation.info(Denotations.scala:190)
	at dotty.tools.dotc.core.SymDenotations$SymDenotation.ensureCompleted(SymDenotations.scala:369)
	at dotty.tools.dotc.typer.Typer.retrieveSym(Typer.scala:2635)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2660)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2755)
	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.traverse$1(Typer.scala:2847)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:2897)
	at dotty.tools.dotc.typer.Typer.typedBlockStats(Typer.scala:1025)
	at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:1029)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2701)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
	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.typedNew(Typer.scala:780)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2697)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2756)
	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.Synthesizer.anonymousMirror(Synthesizer.scala:191)
	at dotty.tools.dotc.typer.Synthesizer.productMirror(Synthesizer.scala:276)
	at dotty.tools.dotc.typer.Synthesizer.$init$$$anonfun$11$$anonfun$1$$anonfun$1$$anonfun$1(Synthesizer.scala:356)
	at dotty.tools.dotc.typer.Synthesizer.makeMirror(Synthesizer.scala:348)
	at dotty.tools.dotc.typer.Synthesizer.$init$$$anonfun$14$$anonfun$4(Synthesizer.scala:356)
	at dotty.tools.dotc.typer.Synthesizer.recur$1(Synthesizer.scala:399)
	at dotty.tools.dotc.typer.Synthesizer.tryAll(Synthesizer.scala:404)
	at dotty.tools.dotc.typer.Implicits.inferImplicitArg(Implicits.scala:854)
	at dotty.tools.dotc.typer.Implicits.inferImplicitArg$(Implicits.scala:774)
	at dotty.tools.dotc.typer.Typer.inferImplicitArg(Typer.scala:106)
	at dotty.tools.dotc.typer.Typer.implicitArgs$1(Typer.scala:3284)
	at dotty.tools.dotc.typer.Typer.addImplicitArgs$3(Typer.scala:3320)
	at dotty.tools.dotc.typer.Typer.adaptNoArgsImplicitMethod$2(Typer.scala:3400)
	at dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:3597)
	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3810)
	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3162)
	at dotty.tools.dotc.typer.Typer.readapt$1(Typer.scala:3173)
	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3797)
	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3162)
	at dotty.tools.dotc.typer.Implicits.typedImplicit(Implicits.scala:1042)
	at dotty.tools.dotc.typer.Implicits.typedImplicit$(Implicits.scala:774)
	at dotty.tools.dotc.typer.Typer.typedImplicit(Typer.scala:106)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.tryImplicit(Implicits.scala:1138)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.rank$1(Implicits.scala:1217)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1385)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1392)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.bestImplicit(Implicits.scala:1425)
	at dotty.tools.dotc.typer.Implicits.inferImplicit(Implicits.scala:991)
	at dotty.tools.dotc.typer.Implicits.inferImplicit$(Implicits.scala:774)
	at dotty.tools.dotc.typer.Typer.inferImplicit(Typer.scala:106)
	at dotty.tools.dotc.typer.Implicits.ignoredInstanceNormalImport$1(Implicits.scala:882)
	at dotty.tools.dotc.typer.Implicits.$anonfun$1(Implicits.scala:896)
	at dotty.tools.dotc.typer.ImplicitSearchError.hiddenImplicitsAddendum(ErrorReporting.scala:419)
	at dotty.tools.dotc.typer.ImplicitSearchError.missingArgMsg(ErrorReporting.scala:267)
	at dotty.tools.dotc.typer.Implicits.missingArgMsg(Implicits.scala:897)
	at dotty.tools.dotc.typer.Implicits.missingArgMsg$(Implicits.scala:774)
	at dotty.tools.dotc.typer.Typer.missingArgMsg(Typer.scala:106)
	at dotty.tools.dotc.typer.Inliner.searchImplicit$1(Inliner.scala:837)
	at dotty.tools.dotc.typer.Inliner.inlined(Inliner.scala:841)
	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.inlineIfNeeded(Inliner.scala:1618)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedTypeApply(Inliner.scala:1549)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2712)
	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.ProtoTypes$FunProto.$anonfun$5(ProtoTypes.scala:428)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.cacheTypedArg(ProtoTypes.scala:359)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.typedArg(ProtoTypes.scala:429)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:850)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:850)
	at dotty.tools.dotc.typer.Applications$Application.addTyped$1(Applications.scala:544)
	at dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:609)
	at dotty.tools.dotc.typer.Applications$Application.init(Applications.scala:447)
	at dotty.tools.dotc.typer.Applications$TypedApply.<init>(Applications.scala:735)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.<init>(Applications.scala:849)
	at dotty.tools.dotc.typer.Applications.ApplyTo(Applications.scala:1057)
	at dotty.tools.dotc.typer.Applications.ApplyTo$(Applications.scala:317)
	at dotty.tools.dotc.typer.Typer.ApplyTo(Typer.scala:106)
	at dotty.tools.dotc.typer.Applications.simpleApply$1(Applications.scala:904)
	at dotty.tools.dotc.typer.Applications.realApply$5$$anonfun$4(Applications.scala:983)
	at dotty.tools.dotc.typer.Typer.tryEither(Typer.scala:2949)
	at dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:994)
	at dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:1032)
	at dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:317)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedApply(Inliner.scala:1535)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2693)
	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.typedExpr(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:1031)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2701)
	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.ReTyper.typedTyped(ReTyper.scala:62)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2698)
	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.Inliner.inlined(Inliner.scala:1016)
	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.inlineIfNeeded(Inliner.scala:1618)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedTypeApply(Inliner.scala:1549)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2712)
	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.ReTyper.typedTyped(ReTyper.scala:62)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2698)
	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:2818)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
	at dotty.tools.dotc.typer.Inliner.inlined(Inliner.scala:1016)
	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
	at dotty.tools.dotc.typer.Typer.adaptNoArgsOther$4(Typer.scala:3503)
	at dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:3619)
	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3810)
	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3162)
	at dotty.tools.dotc.typer.Typer.readapt$1(Typer.scala:3173)
	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3797)
	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3162)
	at dotty.tools.dotc.typer.Implicits.typedImplicit(Implicits.scala:1042)
	at dotty.tools.dotc.typer.Implicits.typedImplicit$(Implicits.scala:774)
	at dotty.tools.dotc.typer.Typer.typedImplicit(Typer.scala:106)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.tryImplicit(Implicits.scala:1138)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.rank$1(Implicits.scala:1217)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1385)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1392)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.bestImplicit(Implicits.scala:1425)
	at dotty.tools.dotc.typer.Implicits.inferImplicit(Implicits.scala:991)
	at dotty.tools.dotc.typer.Implicits.inferImplicit$(Implicits.scala:774)
	at dotty.tools.dotc.typer.Typer.inferImplicit(Typer.scala:106)
	at dotty.tools.dotc.typer.Implicits.inferImplicitArg(Implicits.scala:848)
	at dotty.tools.dotc.typer.Implicits.inferImplicitArg$(Implicits.scala:774)
	at dotty.tools.dotc.typer.Typer.inferImplicitArg(Typer.scala:106)
	at dotty.tools.dotc.typer.Inliner.dotty$tools$dotc$typer$Inliner$reducer$$$_$searchImplicit$2(Inliner.scala:1280)
	at dotty.tools.dotc.typer.Inliner$reducer$.reducePattern$1(Inliner.scala:1358)
	at dotty.tools.dotc.typer.Inliner$reducer$.reduceCase$1(Inliner.scala:1439)
	at dotty.tools.dotc.typer.Inliner$reducer$.recur$2(Inliner.scala:1455)
	at dotty.tools.dotc.typer.Inliner$reducer$.reduceInlineMatch(Inliner.scala:1458)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedMatchFinish(Inliner.scala:1571)
	at dotty.tools.dotc.typer.Typer.typedMatch(Typer.scala:1468)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedMatch(Inliner.scala:1558)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2707)
	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.ReTyper.typedTyped(ReTyper.scala:62)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2698)
	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:2818)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
	at dotty.tools.dotc.typer.Inliner.inlined(Inliner.scala:1016)
	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
	at dotty.tools.dotc.typer.Typer.adaptNoArgsOther$4(Typer.scala:3503)
	at dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:3619)
	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3810)
	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3162)
	at dotty.tools.dotc.typer.Typer.readapt$1(Typer.scala:3173)
	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3797)
	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3162)
	at dotty.tools.dotc.typer.Implicits.typedImplicit(Implicits.scala:1042)
	at dotty.tools.dotc.typer.Implicits.typedImplicit$(Implicits.scala:774)
	at dotty.tools.dotc.typer.Typer.typedImplicit(Typer.scala:106)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.tryImplicit(Implicits.scala:1138)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.rank$1(Implicits.scala:1217)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1385)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1392)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1400)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.bestImplicit(Implicits.scala:1425)
	at dotty.tools.dotc.typer.Implicits.inferImplicit(Implicits.scala:991)
	at dotty.tools.dotc.typer.Implicits.inferImplicit$(Implicits.scala:774)
	at dotty.tools.dotc.typer.Typer.inferImplicit(Typer.scala:106)
	at dotty.tools.dotc.typer.Implicits.inferImplicitArg(Implicits.scala:848)
	at dotty.tools.dotc.typer.Implicits.inferImplicitArg$(Implicits.scala:774)
	at dotty.tools.dotc.typer.Typer.inferImplicitArg(Typer.scala:106)
	at dotty.tools.dotc.typer.Inliner.dotty$tools$dotc$typer$Inliner$reducer$$$_$searchImplicit$2(Inliner.scala:1280)
	at dotty.tools.dotc.typer.Inliner$reducer$.reducePattern$1(Inliner.scala:1358)
	at dotty.tools.dotc.typer.Inliner$reducer$.reduceCase$1(Inliner.scala:1439)
	at dotty.tools.dotc.typer.Inliner$reducer$.recur$2(Inliner.scala:1455)
	at dotty.tools.dotc.typer.Inliner$reducer$.reduceInlineMatch(Inliner.scala:1458)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedMatchFinish(Inliner.scala:1571)
	at dotty.tools.dotc.typer.Typer.typedMatch(Typer.scala:1468)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedMatch(Inliner.scala:1558)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2707)
	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.typedExpr(Typer.scala:2941)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedMatchFinish(Inliner.scala:1593)
	at dotty.tools.dotc.typer.Typer.typedMatch(Typer.scala:1527)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedMatch(Inliner.scala:1558)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2707)
	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.Inliner.inlined(Inliner.scala:1016)
	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.inlineIfNeeded(Inliner.scala:1618)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedTypeApply(Inliner.scala:1549)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2712)
	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.Inliner$InlineTyper.typedSelect(Inliner.scala:1492)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2663)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2755)
	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.typedExpr(Typer.scala:2941)
	at dotty.tools.dotc.typer.Applications.typedTypeApply(Applications.scala:1084)
	at dotty.tools.dotc.typer.Applications.typedTypeApply$(Applications.scala:317)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedTypeApply(Inliner.scala:1549)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2712)
	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.ReTyper.typedTyped(ReTyper.scala:62)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2698)
	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.Inliner.inlined(Inliner.scala:1016)
	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.inlineIfNeeded(Inliner.scala:1618)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedTypeApply(Inliner.scala:1549)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2712)
	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.ProtoTypes$FunProto.$anonfun$5(ProtoTypes.scala:428)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.cacheTypedArg(ProtoTypes.scala:359)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.typedArg(ProtoTypes.scala:429)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:850)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:850)
	at dotty.tools.dotc.typer.Applications$Application.addTyped$1(Applications.scala:544)
	at dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:609)
	at dotty.tools.dotc.typer.Applications$Application.init(Applications.scala:447)
	at dotty.tools.dotc.typer.Applications$TypedApply.<init>(Applications.scala:735)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.<init>(Applications.scala:849)
	at dotty.tools.dotc.typer.Applications.ApplyTo(Applications.scala:1057)
	at dotty.tools.dotc.typer.Applications.ApplyTo$(Applications.scala:317)
	at dotty.tools.dotc.typer.Typer.ApplyTo(Typer.scala:106)
	at dotty.tools.dotc.typer.Applications.simpleApply$1(Applications.scala:904)
	at dotty.tools.dotc.typer.Applications.realApply$5$$anonfun$4(Applications.scala:983)
	at dotty.tools.dotc.typer.Typer.tryEither(Typer.scala:2949)
	at dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:994)
	at dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:1032)
	at dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:317)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedApply(Inliner.scala:1535)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2693)
	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.ProtoTypes$FunProto.$anonfun$5(ProtoTypes.scala:428)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.cacheTypedArg(ProtoTypes.scala:359)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.typedArg(ProtoTypes.scala:429)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:850)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:850)
	at dotty.tools.dotc.typer.Applications$Application.addTyped$1(Applications.scala:544)
	at dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:609)
	at dotty.tools.dotc.typer.Applications$Application.init(Applications.scala:447)
	at dotty.tools.dotc.typer.Applications$TypedApply.<init>(Applications.scala:735)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.<init>(Applications.scala:849)
	at dotty.tools.dotc.typer.Applications.ApplyTo(Applications.scala:1057)
	at dotty.tools.dotc.typer.Applications.ApplyTo$(Applications.scala:317)
	at dotty.tools.dotc.typer.Typer.ApplyTo(Typer.scala:106)
	at dotty.tools.dotc.typer.Applications.simpleApply$1(Applications.scala:904)
	at dotty.tools.dotc.typer.Applications.realApply$5$$anonfun$4(Applications.scala:983)
	at dotty.tools.dotc.typer.Typer.tryEither(Typer.scala:2949)
	at dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:994)
	at dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:1032)
	at dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:317)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedApply(Inliner.scala:1535)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2693)
	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.ReTyper.typedTyped(ReTyper.scala:62)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2698)
	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.Inliner.inlined(Inliner.scala:1016)
	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
	at dotty.tools.dotc.typer.Typer.adaptNoArgsOther$4(Typer.scala:3503)
	at dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:3619)
	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3810)
	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3162)
	at dotty.tools.dotc.typer.Typer.readapt$1(Typer.scala:3173)
	at dotty.tools.dotc.typer.Typer.readaptSimplified$1(Typer.scala:3174)
	at dotty.tools.dotc.typer.Typer.addImplicitArgs$3(Typer.scala:3391)
	at dotty.tools.dotc.typer.Typer.adaptNoArgsImplicitMethod$2(Typer.scala:3400)
	at dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:3597)
	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3810)
	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3162)
	at dotty.tools.dotc.typer.Typer.readapt$1(Typer.scala:3173)
	at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:3797)
	at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:3162)
	at dotty.tools.dotc.typer.Implicits.typedImplicit(Implicits.scala:1042)
	at dotty.tools.dotc.typer.Implicits.typedImplicit$(Implicits.scala:774)
	at dotty.tools.dotc.typer.Typer.typedImplicit(Typer.scala:106)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.tryImplicit(Implicits.scala:1138)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.rank$1(Implicits.scala:1217)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1385)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1392)
	at dotty.tools.dotc.typer.Implicits$ImplicitSearch.bestImplicit(Implicits.scala:1425)
	at dotty.tools.dotc.typer.Implicits.inferImplicit(Implicits.scala:991)
	at dotty.tools.dotc.typer.Implicits.inferImplicit$(Implicits.scala:774)
	at dotty.tools.dotc.typer.Typer.inferImplicit(Typer.scala:106)
	at dotty.tools.dotc.typer.Implicits.inferImplicitArg(Implicits.scala:848)
	at dotty.tools.dotc.typer.Implicits.inferImplicitArg$(Implicits.scala:774)
	at dotty.tools.dotc.typer.Typer.inferImplicitArg(Typer.scala:106)
	at dotty.tools.dotc.typer.Inliner.searchImplicit$1(Inliner.scala:834)
	at dotty.tools.dotc.typer.Inliner.inlined(Inliner.scala:841)
	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.inlineIfNeeded(Inliner.scala:1618)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedTypeApply(Inliner.scala:1549)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2712)
	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.ProtoTypes$FunProto.$anonfun$5(ProtoTypes.scala:428)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.cacheTypedArg(ProtoTypes.scala:359)
	at dotty.tools.dotc.typer.ProtoTypes$FunProto.typedArg(ProtoTypes.scala:429)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:850)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:850)
	at dotty.tools.dotc.typer.Applications$Application.addTyped$1(Applications.scala:544)
	at dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:609)
	at dotty.tools.dotc.typer.Applications$Application.init(Applications.scala:447)
	at dotty.tools.dotc.typer.Applications$TypedApply.<init>(Applications.scala:735)
	at dotty.tools.dotc.typer.Applications$ApplyToUntyped.<init>(Applications.scala:849)
	at dotty.tools.dotc.typer.Applications.ApplyTo(Applications.scala:1057)
	at dotty.tools.dotc.typer.Applications.ApplyTo$(Applications.scala:317)
	at dotty.tools.dotc.typer.Typer.ApplyTo(Typer.scala:106)
	at dotty.tools.dotc.typer.Applications.simpleApply$1(Applications.scala:904)
	at dotty.tools.dotc.typer.Applications.realApply$5$$anonfun$4(Applications.scala:983)
	at dotty.tools.dotc.typer.Typer.tryEither(Typer.scala:2949)
	at dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:994)
	at dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:1032)
	at dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:317)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedApply(Inliner.scala:1535)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2693)
	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.typedExpr(Typer.scala:2941)
	at dotty.tools.dotc.typer.Typer.typedBlock(Typer.scala:1031)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2701)
	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.ReTyper.typedTyped(ReTyper.scala:62)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2698)
	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.Inliner.inlined(Inliner.scala:1016)
	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.inlineIfNeeded(Inliner.scala:1618)
	at dotty.tools.dotc.typer.Inliner$InlineTyper.typedTypeApply(Inliner.scala:1549)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2712)
	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.ReTyper.typedTyped(ReTyper.scala:62)
	at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2698)
	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:2818)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2825)
	at dotty.tools.dotc.typer.Inliner.inlined(Inliner.scala:1016)
	at dotty.tools.dotc.typer.Inliner$.inlineCall(Inliner.scala:153)
	at dotty.tools.dotc.transform.Inlining$InliningTreeMap.transform(Inlining.scala:86)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1420)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
	at dotty.tools.dotc.transform.Inlining$InliningTreeMap.transform(Inlining.scala:94)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1420)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
	at dotty.tools.dotc.transform.Inlining$InliningTreeMap.transform(Inlining.scala:94)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:53)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:111)
	at dotty.tools.dotc.transform.Inlining$InliningTreeMap.transform(Inlining.scala:80)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1463)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
	at dotty.tools.dotc.transform.Inlining$InliningTreeMap.transform(Inlining.scala:80)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.traverse$1(TreeMapWithImplicits.scala:53)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transformStats(TreeMapWithImplicits.scala:60)
	at dotty.tools.dotc.ast.Trees$Instance$TreeMap.transform(Trees.scala:1474)
	at dotty.tools.dotc.ast.TreeMapWithImplicits.transform(TreeMapWithImplicits.scala:120)
	at dotty.tools.dotc.transform.Inlining$InliningTreeMap.transform(Inlining.scala:94)
	at dotty.tools.dotc.transform.Inlining$$anon$2.transform(Inlining.scala:72)
	at dotty.tools.dotc.transform.MacroTransform.run(MacroTransform.scala:21)
	at dotty.tools.dotc.transform.Inlining.run(Inlining.scala:44)
	at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:303)
	at scala.collection.immutable.List.map(List.scala:250)
	at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:304)
	at dotty.tools.dotc.transform.Inlining.runOn(Inlining.scala:48)
	at dotty.tools.dotc.Run.runPhases$4$$anonfun$4(Run.scala:205)
	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:1323)
	at dotty.tools.dotc.Run.runPhases$5(Run.scala:216)
	at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:224)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
	at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:67)
	at dotty.tools.dotc.Run.compileUnits(Run.scala:231)
	at dotty.tools.dotc.Run.compileSources(Run.scala:166)
	at dotty.tools.dotc.Run.compile(Run.scala:150)
	at dotty.tools.dotc.Driver.doCompile(Driver.scala:39)
	at dotty.tools.dotc.Driver.process(Driver.scala:199)
	at dotty.tools.dotc.Driver.process(Driver.scala:167)
	at dotty.tools.dotc.Driver.process(Driver.scala:179)
	at dotty.tools.dotc.Driver.main(Driver.scala:209)
	at dotty.tools.dotc.Main.main(Main.scala)

@griggt
Copy link
Contributor

griggt commented Sep 4, 2021

The example in the above comment regressed in #12428

Also confirmed that reverting #12428 on release-3.0.2 fixes the original reproducer from typelevel/kittens#376

@OlivierBlanvillain OlivierBlanvillain removed the stat:needs minimization Needs a self contained minimization label Sep 7, 2021
@nicolasstucki nicolasstucki added the stat:needs minimization Needs a self contained minimization label Sep 7, 2021
@nicolasstucki
Copy link
Contributor

Minimized to

// This file must be compiled with Scala 2.13
case class Foo[A](x: A)
trait Bar

inline given derivedReducible(using scala.deriving.Mirror.ProductOf[Foo[_]]): Bar =
  scala.compiletime.summonInline[Bar]
  ???

def test = derivedReducible

@nicolasstucki nicolasstucki removed the stat:needs minimization Needs a self contained minimization label Sep 7, 2021
@nicolasstucki
Copy link
Contributor

Here is a backup of the Foo class compiled with 2.13.6 Foo.classes.zip

@joroKr21
Copy link
Member Author

We can replace Foo with Some or any other stdlib class since they are compiled with Scala 2.13

@joroKr21
Copy link
Member Author

It happens when retyping the empty constructor of an anonymous mirror (which is generated for Scala 2 classes):
https://github.com/lampepfl/dotty/blob/87400d73e74a45ccab60d6ee8db818526e3f13c2/compiler/src/dotty/tools/dotc/typer/Synthesizer.scala#L179-L189

I'm not familiar with inlining to be able to tell what's going on with retyping.

@bishabosha
Copy link
Member

It happens when retyping the empty constructor of an anonymous mirror (which is generated for Scala 2 classes):

here is another example which does not need scala 2:

// Qux_1.scala
sealed trait Qux[T] // anonymous mirror because no companion
object QuxImpl:
  case class Foo[A](a: A) extends Qux[A]
// Test_2.scala
trait Bar

// given Bar = ???

inline given derivedReducible(using scala.deriving.Mirror.SumOf[Qux[_]]): Bar =
  scala.compiletime.summonInline[Bar]
  ???

def test = derivedReducible

@joroKr21
Copy link
Member Author

A workaround would be if I could somehow avoid a recursive inline given but I couldn't figure out another way so far.

@heksesang
Copy link

What is the solution currently if I run into this error when using a third-party library? Is it to make sure every type I derive for has a companion object?

@joroKr21
Copy link
Member Author

joroKr21 commented Nov 4, 2021

That or revert to Scala 3.0.1

@sageserpent-open
Copy link

I'm not sure that this is the same problem, but I have the same assertion failure in Scala 3.1.1, again in the context of retyping an anonymous mirror, based on what I can see from the stacktrace. This was also observed when using Magnolia...

[error] ## Exception when compiling 1 sources to /Users/gerardmurphy/IdeaProjects/americium/target/scala-3.1.1/classes
[error] java.lang.AssertionError: assertion failed: <notype> class dotty.tools.dotc.ast.Trees$TypeTree -1
[error] scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
[error] dotty.tools.dotc.typer.ReTyper.assertTyped(ReTyper.scala:29)
[error] dotty.tools.dotc.typer.ReTyper.promote(ReTyper.scala:33)
[error] dotty.tools.dotc.typer.ReTyper.typedTypeTree(ReTyper.scala:69)
[error] dotty.tools.dotc.typer.ReTyper.typedTypeTree(ReTyper.scala:68)

....

[error] dotty.tools.dotc.typer.Typer.typed(Typer.scala:2911)
[error] dotty.tools.dotc.typer.Synthesizer.anonymousMirror(Synthesizer.scala:189)
[error] dotty.tools.dotc.typer.Synthesizer.sumMirror(Synthesizer.scala:336)
[error] dotty.tools.dotc.typer.Synthesizer.$init$$$anonfun$6$$anonfun$1$$anonfun$1$$anonfun$1(Synthesizer.scala:360)
[error] dotty.tools.dotc.typer.Synthesizer.makeMirror(Synthesizer.scala:346)

....


Minimised reproduction here:

import magnolia1.{AutoDerivation, CaseClass, Monadic, SealedTrait}

trait SomeType[X] {}

object SomeType extends AutoDerivation[SomeType] {
  // NOTE: the implementations have been left out, as they are irrelevant from
  // the point of view of provoking the assertion failure.

  def join[X](caseClass: CaseClass[Typeclass, X]): Typeclass[X] = ???

  given SomeType[Int] = ???

  def split[X](
      sealedTrait: SealedTrait[Typeclass, X]
  ): Typeclass[X] = ???
}

object ProvokeCompilerAssertionFailure {
  val okWithNonRecursiveX = implicitly[SomeType[Option[Int]]]

  val troubleWithRecursiveX = implicitly[SomeType[List[Int]]]
}

If this turns out to be a different bug, let me know and I'll raise a new issue.

sageserpent-open added a commit to sageserpent-open/americium that referenced this issue Jan 31, 2022
@smarter smarter added the regression This worked in a previous version but doesn't anymore label Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
itype:bug itype:crash regression This worked in a previous version but doesn't anymore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants