Skip to content

-Yexplicit-nulls failing assertion for flexify HKTypeLambda #23939

@WojciechMazur

Description

@WojciechMazur

Based on OpenCB failure for fehu/opentracing-scala - build logs

Compiler version

Last good release: 3.8.0-RC1-bin-20250821-0a7f843-NIGHTLY
First bad release: 3.8.0-RC1-bin-20250822-658c8bd-NIGHTLY

Minimized code

Requires seperate compilation unit, similar to #23935

// 1_defs.scala

object cats:
  trait FlatMap[F[_]]

  object syntax:
    object flatMap:
      implicit final def catsSyntaxFlatMapOps[F[_]: FlatMap, A](fa: F[A]): FlatMapOps[F, A] = ???
      final class FlatMapOps[F[_], A](private val fa: F[A]) extends AnyVal:
        def flatMap[B](f: A => F[B]): F[B] = ???

  object effect:
    trait Sync[F[_]] extends FlatMap[F]
// 2_test.scala

//> using options -Yexplicit-nulls

import cats.effect.Sync
import cats.syntax.flatMap.*

trait Span
class CurrentSpan[F[_]](fOpt: F[Option[Span]])(using Sync[F]): 
  private def delay[R](f: Span => R): F[Option[R]] = fOpt.flatMap(_ =>  ??? )

Output

Error: java.lang.AssertionError: assertion failed: Should not flexify HKTypeLambda(List(_$1), List(TypeBounds(TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Nothing),TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Any))), TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Any), List())
        at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:10)
        at dotty.tools.dotc.core.Types$FlexibleType$.apply(Types.scala:3450)

Crash stack trace:

Compiling project (test, Scala 3.8.0-RC1-bin-20250916-f031eab-NIGHTLY, JVM (17))

  exception occurred while typechecking /Users/wmazur/projects/scala/community-build3/test.test.scala

  An unhandled exception was thrown in the compiler.
  Please file a crash report here:
  https://github.com/scala/scala3/issues/new/choose
  For non-enriched exceptions, compile with -Xno-enrich-error-messages.


     while compiling: /Users/wmazur/projects/scala/community-build3/test.test.scala
        during phase: typer
                mode: Mode(ImplicitsEnabled,SafeNulls)
     library version: version (unknown)
    compiler version: version 3.8.0-RC1-bin-20250916-f031eab-NIGHTLY-git-f031eab
            settings: -Yexplicit-nulls true -bootclasspath /Users/wmazur/Library/Caches/Coursier/v1/https/repo.scala-lang.org/artifactory/maven-nightlies/org/scala-lang/scala3-library_3/3.8.0-RC1-bin-20250916-f031eab-NIGHTLY/scala3-library_3-3.8.0-RC1-bin-20250916-f031eab-NIGHTLY.jar:/Users/wmazur/Library/Caches/Coursier/v1/https/repo.scala-lang.org/artifactory/maven-nightlies/org/scala-lang/scala-library/3.8.0-RC1-bin-20250916-f031eab-NIGHTLY/scala-library-3.8.0-RC1-bin-20250916-f031eab-NIGHTLY.jar -classpath /Users/wmazur/projects/scala/community-build3/.scala-build/.bloop/community-build3_b216afcc64-6a1193f22b-test/bloop-internal-classes/test-Jc-GfWqcRUCIk-Gop_SKcg==:/Users/wmazur/projects/scala/community-build3/.scala-build/.bloop/community-build3_b216afcc64-6a1193f22b-test/bloop-internal-classes/test-AS8hYlwLQ9O6m9pnudIg0w==:/Users/wmazur/projects/scala/community-build3/.scala-build/.bloop/community-build3_b216afcc64-6a1193f22b/bloop-internal-classes/main-yMjOV4VlQIyk_lKM4vsCgg==:/Users/wmazur/projects/scala/community-build3/.scala-build/.bloop/community-build3_b216afcc64-6a1193f22b/bloop-internal-classes/main-yMjOV4VlQIyk_lKM4vsCgg== -d /Users/wmazur/projects/scala/community-build3/.scala-build/.bloop/community-build3_b216afcc64-6a1193f22b-test/bloop-internal-classes/test-Jc-GfWqcRUCIk-Gop_SKcg== -java-output-version 17 -sourceroot /Users/wmazur/projects/scala/community-build3

Error compiling project (test, Scala 3.8.0-RC1-bin-20250916-f031eab-NIGHTLY, JVM (17))
Error: java.lang.AssertionError: assertion failed: Should not flexify HKTypeLambda(List(_$1), List(TypeBounds(TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Nothing),TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Any))), TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Any), List())
        at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:10)
        at dotty.tools.dotc.core.Types$FlexibleType$.apply(Types.scala:3450)
        at dotty.tools.dotc.core.Types$FlexibleType$.make(Types.scala:3479)
        at dotty.tools.dotc.core.Types$FlexibleType.derivedFlexibleType(Types.scala:3441)
        at dotty.tools.dotc.core.Types$TypeMap.derivedFlexibleType(Types.scala:6273)
        at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:6458)
        at dotty.tools.dotc.typer.ImplicitRunInfo$$anon$1.apply(Implicits.scala:853)
        at dotty.tools.dotc.core.Types$TypeMap.op$proxy19$1(Types.scala:6280)
        at dotty.tools.dotc.core.Types$TypeMap.mapArg(Types.scala:6280)
        at dotty.tools.dotc.core.Types$TypeMap.mapArgs(Types.scala:6284)
        at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:6382)
        at dotty.tools.dotc.typer.ImplicitRunInfo$$anon$1.apply(Implicits.scala:853)
        at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:6458)
        at dotty.tools.dotc.typer.ImplicitRunInfo$$anon$1.apply(Implicits.scala:853)
        at dotty.tools.dotc.core.Types$TypeMap.op$proxy19$1(Types.scala:6280)
        at dotty.tools.dotc.core.Types$TypeMap.mapArg(Types.scala:6280)
        at dotty.tools.dotc.core.Types$TypeMap.mapArgs(Types.scala:6284)
        at dotty.tools.dotc.core.Types$TypeMap.mapArgs(Types.scala:6285)
        at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:6382)
        at dotty.tools.dotc.typer.ImplicitRunInfo$$anon$1.apply(Implicits.scala:853)
        at dotty.tools.dotc.typer.ProtoTypes$ViewProto.map(ProtoTypes.scala:673)
        at dotty.tools.dotc.typer.ProtoTypes$ViewProto.map(ProtoTypes.scala:673)
        at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:6417)
        at dotty.tools.dotc.typer.ImplicitRunInfo$$anon$1.apply(Implicits.scala:853)
        at dotty.tools.dotc.typer.ImplicitRunInfo.implicitScope(Implicits.scala:855)
        at dotty.tools.dotc.typer.ImplicitRunInfo.implicitScope$(Implicits.scala:628)
        at dotty.tools.dotc.Run.implicitScope(Run.scala:45)
        at dotty.tools.dotc.typer.Implicits$ImplicitSearch.implicitScope(Implicits.scala:1811)
        at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1693)
        at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit$$anonfun$3(Implicits.scala:1780)
        at dotty.tools.dotc.typer.Implicits$SearchResult.recoverWith(Implicits.scala:430)
        at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1766)
        at dotty.tools.dotc.typer.Implicits$ImplicitSearch.bestImplicit(Implicits.scala:1807)
        at dotty.tools.dotc.typer.Implicits.inferImplicit(Implicits.scala:1121)
        at dotty.tools.dotc.typer.Implicits.inferImplicit$(Implicits.scala:872)
        at dotty.tools.dotc.typer.Typer.inferImplicit(Typer.scala:155)
        at dotty.tools.dotc.typer.Implicits.inferView(Implicits.scala:912)
        at dotty.tools.dotc.typer.Implicits.inferView$(Implicits.scala:872)
        at dotty.tools.dotc.typer.Typer.inferView(Typer.scala:155)
        at dotty.tools.dotc.typer.Typer.adaptToSubType$1(Typer.scala:4874)
        at dotty.tools.dotc.typer.Typer.adaptNoArgsOther$1(Typer.scala:4684)
        at dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:4764)
        at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:5027)
        at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:4236)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3856)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3861)
        at dotty.tools.dotc.typer.Typer.typedFunctionValue(Typer.scala:2004)
        at dotty.tools.dotc.typer.Typer.typedFunction(Typer.scala:1737)
        at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:3685)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3769)
        at dotty.tools.dotc.typer.ProtoTypes$FunProto.$anonfun$7(ProtoTypes.scala:543)
        at dotty.tools.dotc.typer.ProtoTypes$FunProto.cacheTypedArg(ProtoTypes.scala:466)
        at dotty.tools.dotc.typer.ProtoTypes$FunProto.typedArg(ProtoTypes.scala:545)
        at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:1065)
        at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:1065)
        at dotty.tools.dotc.typer.Applications$Application.addTyped$1(Applications.scala:731)
        at dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:814)
        at dotty.tools.dotc.typer.Applications$Application.init(Applications.scala:610)
        at dotty.tools.dotc.typer.Applications$TypedApply.<init>(Applications.scala:940)
        at dotty.tools.dotc.typer.Applications$ApplyToUntyped.<init>(Applications.scala:1064)
        at dotty.tools.dotc.typer.Applications.ApplyTo(Applications.scala:1362)
        at dotty.tools.dotc.typer.Applications.ApplyTo$(Applications.scala:470)
        at dotty.tools.dotc.typer.Typer.ApplyTo(Typer.scala:155)
        at dotty.tools.dotc.typer.Applications.simpleApply$1(Applications.scala:1152)
        at dotty.tools.dotc.typer.Applications.$anonfun$15(Applications.scala:1268)
        at dotty.tools.dotc.typer.Typer$.tryEither(Typer.scala:128)
        at dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:1287)
        at dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:1336)
        at dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:470)
        at dotty.tools.dotc.typer.Typer.typedApply(Typer.scala:155)
        at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:3675)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3769)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3856)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3861)
        at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3972)
        at dotty.tools.dotc.typer.Typer.$anonfun$66(Typer.scala:3032)
        at dotty.tools.dotc.inlines.PrepareInlineable$.dropInlineIfError(PrepareInlineable.scala:256)
        at dotty.tools.dotc.typer.Typer.typedDefDef(Typer.scala:3032)
        at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:3657)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3768)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3856)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3861)
        at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:3883)
        at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3929)
        at dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:3332)
        at dotty.tools.dotc.typer.Typer.typedTypeOrClassDef$1(Typer.scala:3663)
        at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:3667)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3768)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3856)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3861)
        at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:3883)
        at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3929)
        at dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:3465)
        at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:3709)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3769)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3856)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3861)
        at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3972)
        at dotty.tools.dotc.typer.TyperPhase.typeCheck$$anonfun$1(TyperPhase.scala:47)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
        at dotty.tools.dotc.core.Phases$Phase.monitor(Phases.scala:510)
        at dotty.tools.dotc.typer.TyperPhase.typeCheck(TyperPhase.scala:53)
        at dotty.tools.dotc.typer.TyperPhase.$anonfun$4(TyperPhase.scala:99)
        at scala.collection.Iterator$$anon$6.hasNext(Iterator.scala:493)
        at scala.collection.Iterator$$anon$9.hasNext(Iterator.scala:597)
        at scala.collection.immutable.List.prependedAll(List.scala:156)
        at scala.collection.immutable.List$.from(List.scala:693)
        at scala.collection.immutable.List$.from(List.scala:693)
        at scala.collection.IterableOps$WithFilter.map(Iterable.scala:911)
        at dotty.tools.dotc.typer.TyperPhase.runOn(TyperPhase.scala:98)
        at dotty.tools.dotc.Run.runPhases$1$$anonfun$1(Run.scala:380)
        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:1327)
        at dotty.tools.dotc.Run.runPhases$1(Run.scala:373)
        at dotty.tools.dotc.Run.compileUnits$$anonfun$1$$anonfun$2(Run.scala:420)
        at dotty.tools.dotc.Run.compileUnits$$anonfun$1$$anonfun$adapted$1(Run.scala:420)
        at scala.Function0.apply$mcV$sp(Function0.scala:45)
        at dotty.tools.dotc.Run.showProgress(Run.scala:482)
        at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:420)
        at dotty.tools.dotc.Run.compileUnits$$anonfun$adapted$1(Run.scala:432)
        at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:69)
        at dotty.tools.dotc.Run.compileUnits(Run.scala:432)
        at dotty.tools.dotc.Run.compileSources(Run.scala:319)
        at dotty.tools.dotc.Run.compile(Run.scala:304)
        at dotty.tools.dotc.Driver.doCompile(Driver.scala:37)
        at dotty.tools.xsbt.CompilerBridgeDriver.run(CompilerBridgeDriver.java:141)
        at dotty.tools.xsbt.CompilerBridge.run(CompilerBridge.java:22)
        at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:91)
        at sbt.internal.inc.bloop.internal.BloopHighLevelCompiler.compileSources$1(BloopHighLevelCompiler.scala:148)
        at sbt.internal.inc.bloop.internal.BloopHighLevelCompiler.$anonfun$compile$9(BloopHighLevelCompiler.scala:181)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at sbt.internal.inc.bloop.internal.BloopHighLevelCompiler.$anonfun$compile$1(BloopHighLevelCompiler.scala:73)
        at bloop.tracing.NoopTracer$.trace(BraveTracer.scala:53)
        at sbt.internal.inc.bloop.internal.BloopHighLevelCompiler.timed$1(BloopHighLevelCompiler.scala:72)
        at sbt.internal.inc.bloop.internal.BloopHighLevelCompiler.$anonfun$compile$8(BloopHighLevelCompiler.scala:181)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at monix.eval.internal.TaskRunLoop$.startFull(TaskRunLoop.scala:81)
        at monix.eval.internal.TaskRestartCallback.syncOnSuccess(TaskRestartCallback.scala:101)
        at monix.eval.internal.TaskRestartCallback.onSuccess(TaskRestartCallback.scala:74)
        at monix.eval.internal.TaskExecuteOn$AsyncRegister$$anon$1.run(TaskExecuteOn.scala:71)
        at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)

Error: Unexpected error when compiling community-build3_b216afcc64-6a1193f22b-test: java.lang.AssertionError: assertion failed: Should not flexify HKTypeLambda(List(_$1), List(TypeBounds(TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Nothing),TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Any))), TypeRef(ThisType(TypeRef(NoPrefix,module class scala)),class Any), List())
        at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:10)
        at dotty.tools.dotc.core.Types$FlexibleType$.apply(Types.scala:3450)
        at dotty.tools.dotc.core.Types$FlexibleType$.make(Types.scala:3479)
        at dotty.tools.dotc.core.Types$FlexibleType.derivedFlexibleType(Types.scala:3441)
        at dotty.tools.dotc.core.Types$TypeMap.derivedFlexibleType(Types.scala:6273)
        at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:6458)
        at dotty.tools.dotc.typer.ImplicitRunInfo$$anon$1.apply(Implicits.scala:853)
        at dotty.tools.dotc.core.Types$TypeMap.op$proxy19$1(Types.scala:6280)
        at dotty.tools.dotc.core.Types$TypeMap.mapArg(Types.scala:6280)
        at dotty.tools.dotc.core.Types$TypeMap.mapArgs(Types.scala:6284)
        at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:6382)
        at dotty.tools.dotc.typer.ImplicitRunInfo$$anon$1.apply(Implicits.scala:853)
        at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:6458)
        at dotty.tools.dotc.typer.ImplicitRunInfo$$anon$1.apply(Implicits.scala:853)
        at dotty.tools.dotc.core.Types$TypeMap.op$proxy19$1(Types.scala:6280)
        at dotty.tools.dotc.core.Types$TypeMap.mapArg(Types.scala:6280)
        at dotty.tools.dotc.core.Types$TypeMap.mapArgs(Types.scala:6284)
        at dotty.tools.dotc.core.Types$TypeMap.mapArgs(Types.scala:6285)
        at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:6382)
        at dotty.tools.dotc.typer.ImplicitRunInfo$$anon$1.apply(Implicits.scala:853)
        at dotty.tools.dotc.typer.ProtoTypes$ViewProto.map(ProtoTypes.scala:673)
        at dotty.tools.dotc.typer.ProtoTypes$ViewProto.map(ProtoTypes.scala:673)
        at dotty.tools.dotc.core.Types$TypeMap.mapOver(Types.scala:6417)
        at dotty.tools.dotc.typer.ImplicitRunInfo$$anon$1.apply(Implicits.scala:853)
        at dotty.tools.dotc.typer.ImplicitRunInfo.implicitScope(Implicits.scala:855)
        at dotty.tools.dotc.typer.ImplicitRunInfo.implicitScope$(Implicits.scala:628)
        at dotty.tools.dotc.Run.implicitScope(Run.scala:45)
        at dotty.tools.dotc.typer.Implicits$ImplicitSearch.implicitScope(Implicits.scala:1811)
        at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1693)
        at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit$$anonfun$3(Implicits.scala:1780)
        at dotty.tools.dotc.typer.Implicits$SearchResult.recoverWith(Implicits.scala:430)
        at dotty.tools.dotc.typer.Implicits$ImplicitSearch.searchImplicit(Implicits.scala:1766)
        at dotty.tools.dotc.typer.Implicits$ImplicitSearch.bestImplicit(Implicits.scala:1807)
        at dotty.tools.dotc.typer.Implicits.inferImplicit(Implicits.scala:1121)
        at dotty.tools.dotc.typer.Implicits.inferImplicit$(Implicits.scala:872)
        at dotty.tools.dotc.typer.Typer.inferImplicit(Typer.scala:155)
        at dotty.tools.dotc.typer.Implicits.inferView(Implicits.scala:912)
        at dotty.tools.dotc.typer.Implicits.inferView$(Implicits.scala:872)
        at dotty.tools.dotc.typer.Typer.inferView(Typer.scala:155)
        at dotty.tools.dotc.typer.Typer.adaptToSubType$1(Typer.scala:4874)
        at dotty.tools.dotc.typer.Typer.adaptNoArgsOther$1(Typer.scala:4684)
        at dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:4764)
        at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:5027)
        at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:4236)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3856)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3861)
        at dotty.tools.dotc.typer.Typer.typedFunctionValue(Typer.scala:2004)
        at dotty.tools.dotc.typer.Typer.typedFunction(Typer.scala:1737)
        at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:3685)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3769)
        at dotty.tools.dotc.typer.ProtoTypes$FunProto.$anonfun$7(ProtoTypes.scala:543)
        at dotty.tools.dotc.typer.ProtoTypes$FunProto.cacheTypedArg(ProtoTypes.scala:466)
        at dotty.tools.dotc.typer.ProtoTypes$FunProto.typedArg(ProtoTypes.scala:545)
        at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:1065)
        at dotty.tools.dotc.typer.Applications$ApplyToUntyped.typedArg(Applications.scala:1065)
        at dotty.tools.dotc.typer.Applications$Application.addTyped$1(Applications.scala:731)
        at dotty.tools.dotc.typer.Applications$Application.matchArgs(Applications.scala:814)
        at dotty.tools.dotc.typer.Applications$Application.init(Applications.scala:610)
        at dotty.tools.dotc.typer.Applications$TypedApply.<init>(Applications.scala:940)
        at dotty.tools.dotc.typer.Applications$ApplyToUntyped.<init>(Applications.scala:1064)
        at dotty.tools.dotc.typer.Applications.ApplyTo(Applications.scala:1362)
        at dotty.tools.dotc.typer.Applications.ApplyTo$(Applications.scala:470)
        at dotty.tools.dotc.typer.Typer.ApplyTo(Typer.scala:155)
        at dotty.tools.dotc.typer.Applications.simpleApply$1(Applications.scala:1152)
        at dotty.tools.dotc.typer.Applications.$anonfun$15(Applications.scala:1268)
        at dotty.tools.dotc.typer.Typer$.tryEither(Typer.scala:128)
        at dotty.tools.dotc.typer.Applications.realApply$1(Applications.scala:1287)
        at dotty.tools.dotc.typer.Applications.typedApply(Applications.scala:1336)
        at dotty.tools.dotc.typer.Applications.typedApply$(Applications.scala:470)
        at dotty.tools.dotc.typer.Typer.typedApply(Typer.scala:155)
        at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:3675)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3769)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3856)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3861)
        at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3972)
        at dotty.tools.dotc.typer.Typer.$anonfun$66(Typer.scala:3032)
        at dotty.tools.dotc.inlines.PrepareInlineable$.dropInlineIfError(PrepareInlineable.scala:256)
        at dotty.tools.dotc.typer.Typer.typedDefDef(Typer.scala:3032)
        at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:3657)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3768)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3856)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3861)
        at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:3883)
        at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3929)
        at dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:3332)
        at dotty.tools.dotc.typer.Typer.typedTypeOrClassDef$1(Typer.scala:3663)
        at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:3667)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3768)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3856)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3861)
        at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:3883)
        at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3929)
        at dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:3465)
        at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:3709)
        at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3769)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3856)
        at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3861)
        at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3972)
        at dotty.tools.dotc.typer.TyperPhase.typeCheck$$anonfun$1(TyperPhase.scala:47)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
        at dotty.tools.dotc.core.Phases$Phase.monitor(Phases.scala:510)
        at dotty.tools.dotc.typer.TyperPhase.typeCheck(TyperPhase.scala:53)
        at dotty.tools.dotc.typer.TyperPhase.$anonfun$4(TyperPhase.scala:99)
        at scala.collection.Iterator$$anon$6.hasNext(Iterator.scala:493)
        at scala.collection.Iterator$$anon$9.hasNext(Iterator.scala:597)
        at scala.collection.immutable.List.prependedAll(List.scala:156)
        at scala.collection.immutable.List$.from(List.scala:693)
        at scala.collection.immutable.List$.from(List.scala:693)
        at scala.collection.IterableOps$WithFilter.map(Iterable.scala:911)
        at dotty.tools.dotc.typer.TyperPhase.runOn(TyperPhase.scala:98)
        at dotty.tools.dotc.Run.runPhases$1$$anonfun$1(Run.scala:380)
        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:1327)
        at dotty.tools.dotc.Run.runPhases$1(Run.scala:373)
        at dotty.tools.dotc.Run.compileUnits$$anonfun$1$$anonfun$2(Run.scala:420)
        at dotty.tools.dotc.Run.compileUnits$$anonfun$1$$anonfun$adapted$1(Run.scala:420)
        at scala.Function0.apply$mcV$sp(Function0.scala:45)
        at dotty.tools.dotc.Run.showProgress(Run.scala:482)
        at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:420)
        at dotty.tools.dotc.Run.compileUnits$$anonfun$adapted$1(Run.scala:432)
        at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:69)
        at dotty.tools.dotc.Run.compileUnits(Run.scala:432)
        at dotty.tools.dotc.Run.compileSources(Run.scala:319)
        at dotty.tools.dotc.Run.compile(Run.scala:304)
        at dotty.tools.dotc.Driver.doCompile(Driver.scala:37)
        at dotty.tools.xsbt.CompilerBridgeDriver.run(CompilerBridgeDriver.java:141)
        at dotty.tools.xsbt.CompilerBridge.run(CompilerBridge.java:22)
        at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:91)
        at sbt.internal.inc.bloop.internal.BloopHighLevelCompiler.compileSources$1(BloopHighLevelCompiler.scala:148)
        at sbt.internal.inc.bloop.internal.BloopHighLevelCompiler.$anonfun$compile$9(BloopHighLevelCompiler.scala:181)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at sbt.internal.inc.bloop.internal.BloopHighLevelCompiler.$anonfun$compile$1(BloopHighLevelCompiler.scala:73)
        at bloop.tracing.NoopTracer$.trace(BraveTracer.scala:53)
        at sbt.internal.inc.bloop.internal.BloopHighLevelCompiler.timed$1(BloopHighLevelCompiler.scala:72)
        at sbt.internal.inc.bloop.internal.BloopHighLevelCompiler.$anonfun$compile$8(BloopHighLevelCompiler.scala:181)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at monix.eval.internal.TaskRunLoop$.startFull(TaskRunLoop.scala:81)
        at monix.eval.internal.TaskRestartCallback.syncOnSuccess(TaskRestartCallback.scala:101)
        at monix.eval.internal.TaskRestartCallback.onSuccess(TaskRestartCallback.scala:74)
        at monix.eval.internal.TaskExecuteOn$AsyncRegister$$anon$1.run(TaskExecuteOn.scala:71)
        at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
        at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1312)
        at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1843)
        at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1808)
        at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:188)

Compilation failed
❯ 

Expectation

Should compile

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions