scalascalac

Assertion failed: Invalid interfaces in / assertion failed: ClassBType.info not yet assigned


I fall on this two errors during compilation of my test part and unfortunately my attemps to find any hint to solve these issues failed.

I tried to clean, rebuild from scratch without any success. I compiled with and without my idea with same results.

I'm working with scala 2.12.12 and sbt 1.5.

During my research I read some stuff with possible link to java/scala import ambiguity (https://github.com/scala/bug/issues/9111) but i have no java import.

Here are my scalac options:

scalacOptions ++= Seq(
            "-unchecked",
            "-deprecation",
            "-feature",
            "-language:higherKinds",
            "-language:implicitConversions",
            "-language:existentials",
            "-Ypartial-unification",
        ),

Situation when i fall on them is when i ask a generic type of a specific class, lets call it Toto. FOr example if i write this :

trait Test[
 A, // Everything is OK
 MyClass <: Toto[A] // Problem ! 
] {

  def toto: Toto[Int] // Problem !

}

I tried to reproduce my issue but when i copy exactly the classes respecting their hierarchy. Everything works fine in test with my reproducted example...

Here are the full stacktraces:

java.lang.AssertionError: assertion failed: Invalid interfaces in Lcom/XXX/TraitName;: List(Lcom/XXX;)
  | => cat scala.tools.nsc.backend.jvm.BTypes$ClassBType.scala$tools$nsc$backend$jvm$BTypes$ClassBType$$checkInfoConsistency(BTypes.scala:644)
        at scala.tools.nsc.backend.jvm.BTypes$ClassBType$.apply(BTypes.scala:826)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.classBTypeFromSymbol(BTypesFromSymbols.scala:105)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.$anonfun$computeClassInfo$4(BTypesFromSymbols.scala:331)
    at scala.collection.immutable.List.map(List.scala:293)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.computeClassInfo(BTypesFromSymbols.scala:331)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.$anonfun$classBTypeFromSymbol$5(BTypesFromSymbols.scala:108)
    at scala.tools.nsc.backend.jvm.BTypes$ClassBType$.apply(BTypes.scala:825)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.classBTypeFromSymbol(BTypesFromSymbols.scala:105)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.$anonfun$computeClassInfo$4(BTypesFromSymbols.scala:331)
    at scala.collection.immutable.List.map(List.scala:293)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.computeClassInfo(BTypesFromSymbols.scala:331)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.$anonfun$classBTypeFromSymbol$5(BTypesFromSymbols.scala:108)
    at scala.tools.nsc.backend.jvm.BTypes$ClassBType$.apply(BTypes.scala:825)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.classBTypeFromSymbol(BTypesFromSymbols.scala:105)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.$anonfun$computeClassInfo$4(BTypesFromSymbols.scala:331)
    at scala.collection.immutable.List.map(List.scala:293)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.computeClassInfo(BTypesFromSymbols.scala:331)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.$anonfun$classBTypeFromSymbol$5(BTypesFromSymbols.scala:108)
    at scala.tools.nsc.backend.jvm.BTypes$ClassBType$.apply(BTypes.scala:825)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.classBTypeFromSymbol(BTypesFromSymbols.scala:105)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.$anonfun$computeClassInfo$4(BTypesFromSymbols.scala:331)
    at scala.collection.immutable.List.map(List.scala:293)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.computeClassInfo(BTypesFromSymbols.scala:331)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.$anonfun$classBTypeFromSymbol$5(BTypesFromSymbols.scala:108)
    at scala.tools.nsc.backend.jvm.BTypes$ClassBType$.apply(BTypes.scala:825)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.classBTypeFromSymbol(BTypesFromSymbols.scala:105)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.$anonfun$typeToBType$1(BTypesFromSymbols.scala:163)
    at scala.collection.immutable.HashMap$HashMap1.getOrElse0(HashMap.scala:355)
    at scala.collection.immutable.HashMap$HashTrieMap.getOrElse0(HashMap.scala:587)
    at scala.collection.immutable.HashMap.getOrElse(HashMap.scala:72)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.primitiveOrClassToBType$1(BTypesFromSymbols.scala:163)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.typeToBType(BTypesFromSymbols.scala:178)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.methodBTypeFromMethodType(BTypesFromSymbols.scala:127)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.methodBTypeFromSymbol(BTypesFromSymbols.scala:118)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.$anonfun$buildInlineInfoFromClassSymbol$6(BTypesFromSymbols.scala:585)
    at scala.collection.Iterator$$anon$11.nextCur(Iterator.scala:486)
    at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:492)
    at scala.collection.Iterator.foreach(Iterator.scala:943)
    at scala.collection.Iterator.foreach$(Iterator.scala:943)
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1431)
    at scala.collection.generic.Growable.$plus$plus$eq(Growable.scala:62)
    at scala.collection.generic.Growable.$plus$plus$eq$(Growable.scala:53)
    at scala.collection.immutable.Map$MapBuilderImpl.$plus$plus$eq(Map.scala:583)
    at scala.collection.immutable.Map$MapBuilderImpl.$plus$plus$eq(Map.scala:533)
    at scala.collection.TraversableOnce.toMap(TraversableOnce.scala:354)
    at scala.collection.TraversableOnce.toMap$(TraversableOnce.scala:352)
    at scala.collection.AbstractIterator.toMap(Iterator.scala:1431)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.buildInlineInfoFromClassSymbol(BTypesFromSymbols.scala:618)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.buildInlineInfo(BTypesFromSymbols.scala:522)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.computeClassInfo(BTypesFromSymbols.scala:441)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.$anonfun$classBTypeFromSymbol$5(BTypesFromSymbols.scala:108)
    at scala.tools.nsc.backend.jvm.BTypes$ClassBType$.apply(BTypes.scala:825)
    at scala.tools.nsc.backend.jvm.BTypesFromSymbols.classBTypeFromSymbol(BTypesFromSymbols.scala:105)
    at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.genPlainClass(BCodeSkelBuilder.scala:97)
    at scala.tools.nsc.backend.jvm.CodeGen.genClass(CodeGen.scala:81)
    at scala.tools.nsc.backend.jvm.CodeGen.genClassDef$1(CodeGen.scala:42)
    at scala.tools.nsc.backend.jvm.CodeGen.$anonfun$genUnit$3(CodeGen.scala:66)
    at scala.tools.nsc.backend.jvm.CodeGen.genClassDefs$1(CodeGen.scala:66)
    at scala.tools.nsc.backend.jvm.CodeGen.$anonfun$genUnit$2(CodeGen.scala:65)
    at scala.tools.nsc.backend.jvm.CodeGen.genClassDefs$1(CodeGen.scala:65)
    at scala.tools.nsc.backend.jvm.CodeGen.$anonfun$genUnit$4(CodeGen.scala:70)
    at scala.tools.nsc.backend.jvm.CodeGen.genUnit(CodeGen.scala:70)
    at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase.apply(GenBCode.scala:74)
    at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:454)
    at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:402)
    at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase.super$run(GenBCode.scala:80)
    at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase.$anonfun$run$1(GenBCode.scala:80)
    at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase.run(GenBCode.scala:78)
    at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1511)
    at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1495)
    at scala.tools.nsc.Global$Run.compileSources(Global.scala:1488)
    at scala.tools.nsc.Global$Run.compileFiles(Global.scala:1596)
    at xsbt.CachedCompiler0.run(CompilerBridge.scala:163)
    at xsbt.CachedCompiler0.run(CompilerBridge.scala:134)
    at xsbt.CompilerBridge.run(CompilerBridge.scala:39)
    at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:92)
    at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$7(MixedAnalyzingCompiler.scala:186)
    at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
    at sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:241)
    at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4(MixedAnalyzingCompiler.scala:176)
    at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4$adapted(MixedAnalyzingCompiler.scala:157)
    at sbt.internal.inc.JarUtils$.withPreviousJar(JarUtils.scala:239)
    at sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:157)
    at sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:204)
    at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1(IncrementalCompilerImpl.scala:573)
    at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1$adapted(IncrementalCompilerImpl.scala:573)
    at sbt.internal.inc.Incremental$.$anonfun$apply$5(Incremental.scala:173)
    at sbt.internal.inc.Incremental$.$anonfun$apply$5$adapted(Incremental.scala:171)
    at sbt.internal.inc.Incremental$$anon$2.run(Incremental.scala:458)
    at sbt.internal.inc.IncrementalCommon$CycleState.next(IncrementalCommon.scala:116)
    at sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:56)
    at sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:52)
    at sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:261)
    at sbt.internal.inc.Incremental$.$anonfun$incrementalCompile$8(Incremental.scala:413)
    at sbt.internal.inc.Incremental$.withClassfileManager(Incremental.scala:498)
    at sbt.internal.inc.Incremental$.incrementalCompile(Incremental.scala:400)
    at sbt.internal.inc.Incremental$.apply(Incremental.scala:165)
    at sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:573)
    at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:491)
    at sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:332)
    at sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:420)
    at sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:137)
    at sbt.Defaults$.compileIncrementalTaskImpl(Defaults.scala:2176)
    at sbt.Defaults$.$anonfun$compileIncrementalTask$2(Defaults.scala:2133)
    at sbt.internal.io.Retry$.apply(Retry.scala:40)
    at sbt.internal.io.Retry$.apply(Retry.scala:23)
    at sbt.internal.server.BspCompileTask$.compute(BspCompileTask.scala:31)
    at sbt.Defaults$.$anonfun$compileIncrementalTask$1(Defaults.scala:2129)
    at scala.Function1.$anonfun$compose$1(Function1.scala:49)
    at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
    at sbt.std.Transform$$anon$4.work(Transform.scala:68)
    at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
    at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
    at sbt.Execute.work(Execute.scala:291)
    at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
    at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
java.lang.AssertionError: assertion failed: ClassBType.info not yet assigned: Lcom/xxx/Class;
  | => cat scala.tools.nsc.backend.jvm.BTypes$ClassBType.info(BTypes.scala:620)
        at scala.tools.nsc.backend.jvm.BTypes$ClassBType.isInterface(BTypes.scala:652)
    at scala.tools.nsc.backend.jvm.BTypes$ClassBType.isSubtypeOf(BTypes.scala:707)
    at scala.tools.nsc.backend.jvm.BTypes$ClassBType.$anonfun$isSubtypeOf$1(BTypes.scala:719)
    at scala.tools.nsc.backend.jvm.BTypes$ClassBType.isSubtypeOf(BTypes.scala:719)
    at scala.tools.nsc.backend.jvm.BTypes$ClassBType.$anonfun$isSubtypeOf$1(BTypes.scala:719)
    at scala.tools.nsc.backend.jvm.BTypes$ClassBType.isSubtypeOf(BTypes.scala:719)
    at scala.tools.nsc.backend.jvm.BTypes$ClassBType.$anonfun$isSubtypeOf$1(BTypes.scala:719)
    at scala.tools.nsc.backend.jvm.BTypes$ClassBType.isSubtypeOf(BTypes.scala:719)
    at scala.tools.nsc.backend.jvm.BTypes$ClassBType.$anonfun$isSubtypeOf$1(BTypes.scala:719)
    at scala.tools.nsc.backend.jvm.BTypes$ClassBType.isSubtypeOf(BTypes.scala:719)
    at scala.tools.nsc.backend.jvm.BTypes$ClassBType.$anonfun$isSubtypeOf$1(BTypes.scala:719)
    at scala.tools.nsc.backend.jvm.BTypes$ClassBType.isSubtypeOf(BTypes.scala:719)
    at scala.tools.nsc.backend.jvm.BTypes$BType.$anonfun$conformsTo$1(BTypes.scala:145)
    at scala.tools.nsc.backend.jvm.BTypes$BType.conformsTo(BTypes.scala:118)
    at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.adapt(BCodeBodyBuilder.scala:831)
    at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genLoad(BCodeBodyBuilder.scala:397)
    at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.$anonfun$genLoadArguments$1(BCodeBodyBuilder.scala:944)
    at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genLoadArguments(BCodeBodyBuilder.scala:944)
    at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genApply(BCodeBodyBuilder.scala:674)
    at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genLoad(BCodeBodyBuilder.scala:304)
    at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genLoad(BCodeBodyBuilder.scala:257)
    at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genLoadQualifier(BCodeBodyBuilder.scala:909)
    at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genTypeApply$1(BCodeBodyBuilder.scala:533)
    at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genApply(BCodeBodyBuilder.scala:564)
    at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genLoad(BCodeBodyBuilder.scala:304)
    at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.emitNormalMethodBody$1(BCodeSkelBuilder.scala:609)
    at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.genDefDef(BCodeSkelBuilder.scala:641)
    at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.gen(BCodeSkelBuilder.scala:513)
    at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.$anonfun$gen$7(BCodeSkelBuilder.scala:517)
    at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.gen(BCodeSkelBuilder.scala:517)
    at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder.genPlainClass(BCodeSkelBuilder.scala:117)
    at scala.tools.nsc.backend.jvm.CodeGen.genClass(CodeGen.scala:81)
    at scala.tools.nsc.backend.jvm.CodeGen.genClassDef$1(CodeGen.scala:42)
    at scala.tools.nsc.backend.jvm.CodeGen.$anonfun$genUnit$3(CodeGen.scala:66)
    at scala.tools.nsc.backend.jvm.CodeGen.genClassDefs$1(CodeGen.scala:66)
    at scala.tools.nsc.backend.jvm.CodeGen.$anonfun$genUnit$2(CodeGen.scala:65)
    at scala.tools.nsc.backend.jvm.CodeGen.genClassDefs$1(CodeGen.scala:65)
    at scala.tools.nsc.backend.jvm.CodeGen.$anonfun$genUnit$4(CodeGen.scala:70)
    at scala.tools.nsc.backend.jvm.CodeGen.genUnit(CodeGen.scala:70)
    at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase.apply(GenBCode.scala:74)
    at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:454)
    at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:402)
    at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase.super$run(GenBCode.scala:80)
    at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase.$anonfun$run$1(GenBCode.scala:80)
    at scala.tools.nsc.backend.jvm.GenBCode$BCodePhase.run(GenBCode.scala:78)
    at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1511)
    at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1495)
    at scala.tools.nsc.Global$Run.compileSources(Global.scala:1488)
    at scala.tools.nsc.Global$Run.compileFiles(Global.scala:1596)
    at xsbt.CachedCompiler0.run(CompilerBridge.scala:163)
    at xsbt.CachedCompiler0.run(CompilerBridge.scala:134)
    at xsbt.CompilerBridge.run(CompilerBridge.scala:39)
    at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:92)
    at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$7(MixedAnalyzingCompiler.scala:186)
    at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
    at sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:241)
    at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4(MixedAnalyzingCompiler.scala:176)
    at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4$adapted(MixedAnalyzingCompiler.scala:157)
    at sbt.internal.inc.JarUtils$.withPreviousJar(JarUtils.scala:239)
    at sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:157)
    at sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:204)
    at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1(IncrementalCompilerImpl.scala:573)
    at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1$adapted(IncrementalCompilerImpl.scala:573)
    at sbt.internal.inc.Incremental$.$anonfun$apply$5(Incremental.scala:173)
    at sbt.internal.inc.Incremental$.$anonfun$apply$5$adapted(Incremental.scala:171)
    at sbt.internal.inc.Incremental$$anon$2.run(Incremental.scala:458)
    at sbt.internal.inc.IncrementalCommon$CycleState.next(IncrementalCommon.scala:116)
    at sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:56)
    at sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:52)
    at sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:261)
    at sbt.internal.inc.Incremental$.$anonfun$incrementalCompile$8(Incremental.scala:413)
    at sbt.internal.inc.Incremental$.withClassfileManager(Incremental.scala:498)
    at sbt.internal.inc.Incremental$.incrementalCompile(Incremental.scala:400)
    at sbt.internal.inc.Incremental$.apply(Incremental.scala:165)
    at sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:573)
    at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:491)
    at sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:332)
    at sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:420)
    at sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:137)
    at sbt.Defaults$.compileIncrementalTaskImpl(Defaults.scala:2176)
    at sbt.Defaults$.$anonfun$compileIncrementalTask$2(Defaults.scala:2133)
    at sbt.internal.io.Retry$.apply(Retry.scala:40)
    at sbt.internal.io.Retry$.apply(Retry.scala:23)
    at sbt.internal.server.BspCompileTask$.compute(BspCompileTask.scala:31)
    at sbt.Defaults$.$anonfun$compileIncrementalTask$1(Defaults.scala:2129)
    at scala.Function1.$anonfun$compose$1(Function1.scala:49)
    at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
    at sbt.std.Transform$$anon$4.work(Transform.scala:68)
    at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
    at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
    at sbt.Execute.work(Execute.scala:291)
    at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
    at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)

Solution

  • Error came from duplicate class name under same package. After rename it, the error disapear.

    // Main
    package orga.toto
    class Toto[A]
    
    // Test
    package orga.toto
    class Toto // Error, rename it to fix it.