scala / scala3

The Scala 3 compiler, also known as Dotty.
https://dotty.epfl.ch
Apache License 2.0
5.87k stars 1.06k forks source link

Context functions and polymorphic function types don't work together #9686

Open Katrix opened 4 years ago

Katrix commented 4 years ago

Minimized code

trait UntypedLambda[E] {
  def lam(f: E => E): E
  def app(e1: E, e2: E): E
}

def lam[E](f: E => E)(using ul: UntypedLambda[E]): E = ul.lam(f)
def app[E](e1: E, e2: E)(using ul: UntypedLambda[E]): E = ul.app(e1, e2)

type WithUntypedLambda[A] = UntypedLambda[A] ?=> A

type Hoas = [A] => UntypedLambda[A] ?=> A

//Doesn't work
//val example1: Hoas = [A] => lam[A](x => lam(y => app(x, y)))

//Works
val example1: Hoas = [A] => (using tc: UntypedLambda[A]) => lam[A](x => lam(y => app(x, y)))

Expectation

This should work, as the polymorphic function still needs a value, it's just not shown to the user.

dgalichet commented 2 years ago

Hi all,

I have another sample that I doesn't work as expected. I'm not sure if my code is syntactically correct (tuple map expects [A] => A => F[A]) and I provide a [A] => A => Numeric[A] ?=> A (I use numeric in tuple and F[_] is Identity in my case)

type Inc = [A] => A => Numeric[A] ?=> A
val inc: Inc = [A] => (a: A) => (ev: Numeric[A]) ?=> ev.plus(a, ev.one)

def pair[B: Numeric, C: Numeric](b: B, c: C, inc: Inc): (B, C) = (inc(b), inc(c))

  pair(1, 2.0, inc) // This works (2, 3.0)
  (1, 2.0).map(inc) // Should return (2, 3.0) but got Exception during compilation (see below)

[error] (Compile / compileIncremental) java.lang.AssertionError: assertion failed: orphan parameter reference: TypeParamRef(A)
[error] Total time: 1 s, completed 6 déc. 2021 à 09:29:18
sbt:Scala 3 playground> compile
[info] compiling 1 Scala source to .../target/scala-3.1.0/classes ...
error when pickling type A
error when pickling type Numeric[A]
error when pickling type (Numeric[A]) ?=> scala$ContextFunction1$$R
error when pickling type [scala$ContextFunction1$$R] =>> (Numeric[A]) ?=> scala$ContextFunction1$$R
error when pickling tree ([scala$ContextFunction1$$R] =>> (Numeric[A]) ?=> scala$ContextFunction1$$R)
error when pickling tree Tuple2.apply[Double, Double](1.0d, 2.0d).map[
  ([scala$ContextFunction1$$R] =>> (Numeric[A]) ?=> scala$ContextFunction1$$R)
]
error when pickling tree Tuple2.apply[Double, Double](1.0d, 2.0d).map[
  ([scala$ContextFunction1$$R] =>> (Numeric[A]) ?=> scala$ContextFunction1$$R)
](playground.inc)
...
xuwei-k commented 2 years ago

another example without Context function

scalaVersion := "3.1.3-RC1-bin-20220404-ad2553d-NIGHTLY"
class A {
  class B
}

object Main {
  def x[C](f : [a <: A] => (a1: a) => a1.B => C): Unit = ()

  x([a <: A] => (a1: a) => (b: a1.B) => b)
}
``` error when pickling type a1.type error when pickling type a1.B error when pickling tree a1.B error when pickling tree Main.x[a1.B] error when pickling tree Main.x[a1.B]( { final class $anon() extends Object(), PolyFunction { def apply[a >: Nothing <: A](a1: a): a1.B => a1.B = { def $anonfun(b: a1.B): a1.B = b closure($anonfun) } } new $anon():([a <: A] => (a1: a) => a1.B => a1.B) } ) error when pickling tree () extends Object() { this: Main.type => private def writeReplace(): AnyRef = new scala.runtime.ModuleSerializationProxy(classOf[Main.type]) def x[C >: Nothing <: Any]( f: PolyFunction { def apply[a >: Nothing <: A](a1: a): a1.B => C } ): Unit = () Main.x[a1.B]( { final class $anon() extends Object(), PolyFunction { def apply[a >: Nothing <: A](a1: a): a1.B => a1.B = { def $anonfun(b: a1.B): a1.B = b closure($anonfun) } } new $anon():([a <: A] => (a1: a) => a1.B => a1.B) } ) } error when pickling tree @SourceFile("A.scala") final module class Main() extends Object() { this: Main.type => private def writeReplace(): AnyRef = new scala.runtime.ModuleSerializationProxy(classOf[Main.type]) def x[C >: Nothing <: Any]( f: PolyFunction { def apply[a >: Nothing <: A](a1: a): a1.B => C } ): Unit = () Main.x[a1.B]( { final class $anon() extends Object(), PolyFunction { def apply[a >: Nothing <: A](a1: a): a1.B => a1.B = { def $anonfun(b: a1.B): a1.B = b closure($anonfun) } } new $anon():([a <: A] => (a1: a) => a1.B => a1.B) } ) } error when pickling tree package { final lazy module val Main: Main = new Main() @SourceFile("A.scala") final module class Main() extends Object() { this: Main.type => private def writeReplace(): AnyRef = new scala.runtime.ModuleSerializationProxy(classOf[Main.type]) def x[C >: Nothing <: Any]( f: PolyFunction { def apply[a >: Nothing <: A](a1: a): a1.B => C } ): Unit = () Main.x[a1.B]( { final class $anon() extends Object(), PolyFunction { def apply[a >: Nothing <: A](a1: a): a1.B => a1.B = { def $anonfun(b: a1.B): a1.B = b closure($anonfun) } } new $anon():([a <: A] => (a1: a) => a1.B => a1.B) } ) } } [info] exception occurred while compiling /Users/kenji/scala-3-issue-9686/A.scala java.lang.AssertionError: assertion failed: orphan parameter reference: TermParamRef(a1) while compiling /Users/kenji/scala-3-issue-9686/A.scala [error] ## Exception when compiling 1 sources to /Users/kenji/scala-3-issue-9686/target/scala-3.1.3-RC1-bin-20220404-ad2553d-NIGHTLY/classes [error] java.lang.AssertionError: assertion failed: orphan parameter reference: TermParamRef(a1) [error] scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleNewType(TreePickler.scala:282) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleType(TreePickler.scala:151) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleExternalRef$1(TreePickler.scala:191) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleNewType(TreePickler.scala:213) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleType(TreePickler.scala:151) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:597) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleTpt(TreePickler.scala:309) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$4$$anonfun$1(TreePickler.scala:428) [error] scala.runtime.function.JProcedure1.apply(JProcedure1.java:15) [error] scala.runtime.function.JProcedure1.apply(JProcedure1.java:10) [error] scala.collection.immutable.List.foreach(List.scala:333) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$4(TreePickler.scala:428) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$adapted$4(TreePickler.scala:429) [error] scala.Function0.apply$mcV$sp(Function0.scala:39) [error] dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:54) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:429) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$3(TreePickler.scala:420) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$adapted$3(TreePickler.scala:422) [error] scala.Function0.apply$mcV$sp(Function0.scala:39) [error] dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:54) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:422) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleStats$$anonfun$2(TreePickler.scala:353) [error] scala.runtime.function.JProcedure1.apply(JProcedure1.java:15) [error] scala.runtime.function.JProcedure1.apply(JProcedure1.java:10) [error] scala.collection.immutable.List.foreach(List.scala:333) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleStats(TreePickler.scala:353) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$26(TreePickler.scala:579) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$adapted$24(TreePickler.scala:580) [error] scala.Function0.apply$mcV$sp(Function0.scala:39) [error] dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:54) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:580) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleDef$$anonfun$1(TreePickler.scala:325) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleDef$$anonfun$adapted$1(TreePickler.scala:330) [error] scala.Function0.apply$mcV$sp(Function0.scala:39) [error] dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:54) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleDef(TreePickler.scala:330) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:555) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleStats$$anonfun$2(TreePickler.scala:353) [error] scala.runtime.function.JProcedure1.apply(JProcedure1.java:15) [error] scala.runtime.function.JProcedure1.apply(JProcedure1.java:10) [error] scala.collection.immutable.List.foreach(List.scala:333) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleStats(TreePickler.scala:353) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$29(TreePickler.scala:595) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$adapted$27(TreePickler.scala:595) [error] scala.Function0.apply$mcV$sp(Function0.scala:39) [error] dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:54) [error] dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:595) [error] dotty.tools.dotc.core.tasty.TreePickler.pickle$$anonfun$1(TreePickler.scala:766) [error] scala.runtime.function.JProcedure1.apply(JProcedure1.java:15) [error] scala.runtime.function.JProcedure1.apply(JProcedure1.java:10) [error] scala.collection.immutable.List.foreach(List.scala:333) [error] dotty.tools.dotc.core.tasty.TreePickler.pickle(TreePickler.scala:766) [error] dotty.tools.dotc.transform.Pickler.run$$anonfun$1$$anonfun$1(Pickler.scala:72) [error] scala.runtime.function.JProcedure1.apply(JProcedure1.java:15) [error] scala.runtime.function.JProcedure1.apply(JProcedure1.java:10) [error] scala.collection.immutable.List.foreach(List.scala:333) [error] dotty.tools.dotc.transform.Pickler.run$$anonfun$1(Pickler.scala:109) [error] scala.runtime.function.JProcedure1.apply(JProcedure1.java:15) [error] scala.runtime.function.JProcedure1.apply(JProcedure1.java:10) [error] scala.collection.immutable.List.foreach(List.scala:333) [error] dotty.tools.dotc.transform.Pickler.run(Pickler.scala:109) [error] dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:311) [error] scala.collection.immutable.List.map(List.scala:246) [error] dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:312) [error] dotty.tools.dotc.transform.Pickler.runOn(Pickler.scala:114) [error] dotty.tools.dotc.Run.runPhases$1$$anonfun$1(Run.scala:225) [error] scala.runtime.function.JProcedure1.apply(JProcedure1.java:15) [error] scala.runtime.function.JProcedure1.apply(JProcedure1.java:10) [error] scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1328) [error] dotty.tools.dotc.Run.runPhases$1(Run.scala:236) [error] dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:244) [error] dotty.tools.dotc.Run.compileUnits$$anonfun$adapted$1(Run.scala:253) [error] dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:68) [error] dotty.tools.dotc.Run.compileUnits(Run.scala:253) [error] dotty.tools.dotc.Run.compileSources(Run.scala:186) [error] dotty.tools.dotc.Run.compile(Run.scala:170) [error] dotty.tools.dotc.Driver.doCompile(Driver.scala:35) [error] dotty.tools.xsbt.CompilerBridgeDriver.run(CompilerBridgeDriver.java:88) [error] dotty.tools.xsbt.CompilerBridge.run(CompilerBridge.java:22) [error] sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:91) [error] sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$7(MixedAnalyzingCompiler.scala:192) [error] scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23) [error] sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:247) [error] sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4(MixedAnalyzingCompiler.scala:182) [error] sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4$adapted(MixedAnalyzingCompiler.scala:163) [error] sbt.internal.inc.JarUtils$.withPreviousJar(JarUtils.scala:239) [error] sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:163) [error] sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:210) [error] sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1(IncrementalCompilerImpl.scala:528) [error] sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1$adapted(IncrementalCompilerImpl.scala:528) [error] sbt.internal.inc.Incremental$.$anonfun$apply$5(Incremental.scala:177) [error] sbt.internal.inc.Incremental$.$anonfun$apply$5$adapted(Incremental.scala:175) [error] sbt.internal.inc.Incremental$$anon$2.run(Incremental.scala:461) [error] sbt.internal.inc.IncrementalCommon$CycleState.next(IncrementalCommon.scala:116) [error] sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:56) [error] sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:52) [error] sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:263) [error] sbt.internal.inc.Incremental$.$anonfun$incrementalCompile$8(Incremental.scala:416) [error] sbt.internal.inc.Incremental$.withClassfileManager(Incremental.scala:503) [error] sbt.internal.inc.Incremental$.incrementalCompile(Incremental.scala:403) [error] sbt.internal.inc.Incremental$.apply(Incremental.scala:169) [error] sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:528) [error] sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:482 [error] sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:332) [error] sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:420) [error] sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:137) [error] sbt.Defaults$.compileIncrementalTaskImpl(Defaults.scala:2366) [error] sbt.Defaults$.$anonfun$compileIncrementalTask$2(Defaults.scala:2316) [error] sbt.internal.server.BspCompileTask$.$anonfun$compute$1(BspCompileTask.scala:30) [error] sbt.internal.io.Retry$.apply(Retry.scala:46) [error] sbt.internal.io.Retry$.apply(Retry.scala:28) [error] sbt.internal.io.Retry$.apply(Retry.scala:23) [error] sbt.internal.server.BspCompileTask$.compute(BspCompileTask.scala:30) [error] sbt.Defaults$.$anonfun$compileIncrementalTask$1(Defaults.scala:2314) [error] scala.Function1.$anonfun$compose$1(Function1.scala:49) [error] sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62) [error] sbt.std.Transform$$anon$4.work(Transform.scala:68) [error] sbt.Execute.$anonfun$submit$2(Execute.scala:282) [error] sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23) [error] sbt.Execute.work(Execute.scala:291) [error] sbt.Execute.$anonfun$submit$1(Execute.scala:282) [error] sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265) [error] sbt.CompletionService$$anon$2.call(CompletionService.scala:64) [error] java.util.concurrent.FutureTask.run(FutureTask.java:266) [error] java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [error] java.util.concurrent.FutureTask.run(FutureTask.java:266) [error] java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [error] java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [error] java.lang.Thread.run(Thread.java:750) [error] [error] java.lang.AssertionError: assertion failed: orphan parameter reference: TermParamRef(a1) [error] at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleNewType(TreePickler.scala:282) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleType(TreePickler.scala:151) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleExternalRef$1(TreePickler.scala:191) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleNewType(TreePickler.scala:213) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleType(TreePickler.scala:151) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:597) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleTpt(TreePickler.scala:309) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$4$$anonfun$1(TreePickler.scala:428) [error] at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15) [error] at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10) [error] at scala.collection.immutable.List.foreach(List.scala:333) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$4(TreePickler.scala:428) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$adapted$4(TreePickler.scala:429) [error] at scala.Function0.apply$mcV$sp(Function0.scala:39) [error] at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:54) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:429) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$3(TreePickler.scala:420) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$adapted$3(TreePickler.scala:422) [error] at scala.Function0.apply$mcV$sp(Function0.scala:39) [error] at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:54) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:422) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleStats$$anonfun$2(TreePickler.scala:353) [error] at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15) [error] at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10) [error] at scala.collection.immutable.List.foreach(List.scala:333) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleStats(TreePickler.scala:353) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$26(TreePickler.scala:579) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$adapted$24(TreePickler.scala:580) [error] at scala.Function0.apply$mcV$sp(Function0.scala:39) [error] at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:54) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:580) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleDef$$anonfun$1(TreePickler.scala:325) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleDef$$anonfun$adapted$1(TreePickler.scala:330) [error] at scala.Function0.apply$mcV$sp(Function0.scala:39) [error] at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:54) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleDef(TreePickler.scala:330) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:555) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleStats$$anonfun$2(TreePickler.scala:353) [error] at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15) [error] at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10) [error] at scala.collection.immutable.List.foreach(List.scala:333) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleStats(TreePickler.scala:353) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$29(TreePickler.scala:595) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$adapted$27(TreePickler.scala:595) [error] at scala.Function0.apply$mcV$sp(Function0.scala:39) [error] at dotty.tools.dotc.core.tasty.TreePickler.withLength(TreePickler.scala:54) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:595) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickle$$anonfun$1(TreePickler.scala:766) [error] at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15) [error] at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10) [error] at scala.collection.immutable.List.foreach(List.scala:333) [error] at dotty.tools.dotc.core.tasty.TreePickler.pickle(TreePickler.scala:766) [error] at dotty.tools.dotc.transform.Pickler.run$$anonfun$1$$anonfun$1(Pickler.scala:72) [error] at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15) [error] at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10) [error] at scala.collection.immutable.List.foreach(List.scala:333) [error] at dotty.tools.dotc.transform.Pickler.run$$anonfun$1(Pickler.scala:109) [error] at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15) [error] at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10) [error] at scala.collection.immutable.List.foreach(List.scala:333) [error] at dotty.tools.dotc.transform.Pickler.run(Pickler.scala:109) [error] at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:311) [error] at scala.collection.immutable.List.map(List.scala:246) [error] at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:312) [error] at dotty.tools.dotc.transform.Pickler.runOn(Pickler.scala:114) [error] at dotty.tools.dotc.Run.runPhases$1$$anonfun$1(Run.scala:225) [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:1328) [error] at dotty.tools.dotc.Run.runPhases$1(Run.scala:236) [error] at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:244) [error] at dotty.tools.dotc.Run.compileUnits$$anonfun$adapted$1(Run.scala:253) [error] at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:68) [error] at dotty.tools.dotc.Run.compileUnits(Run.scala:253) [error] at dotty.tools.dotc.Run.compileSources(Run.scala:186) [error] at dotty.tools.dotc.Run.compile(Run.scala:170) [error] at dotty.tools.dotc.Driver.doCompile(Driver.scala:35) [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:192) [error] at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23) [error] at sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:247) [error] at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4(MixedAnalyzingCompiler.scala:182) [error] at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4$adapted(MixedAnalyzingCompiler.scala:163) [error] at sbt.internal.inc.JarUtils$.withPreviousJar(JarUtils.scala:239) [error] at sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:163) [error] at sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:210) [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:177) [error] at sbt.internal.inc.Incremental$.$anonfun$apply$5$adapted(Incremental.scala:175) [error] at sbt.internal.inc.Incremental$$anon$2.run(Incremental.scala:461) [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:263) [error] at sbt.internal.inc.Incremental$.$anonfun$incrementalCompile$8(Incremental.scala:416) [error] at sbt.internal.inc.Incremental$.withClassfileManager(Incremental.scala:503) [error] at sbt.internal.inc.Incremental$.incrementalCompile(Incremental.scala:403) [error] at sbt.internal.inc.Incremental$.apply(Incremental.scala:169) [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:2366) [error] at sbt.Defaults$.$anonfun$compileIncrementalTask$2(Defaults.scala:2316) [error] at sbt.internal.server.BspCompileTask$.$anonfun$compute$1(BspCompileTask.scala:30) [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:30) [error] at sbt.Defaults$.$anonfun$compileIncrementalTask$1(Defaults.scala:2314) [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:750) ```