Closed
Description
object App {
type Id[A] >: A <: A
val a: Array[_ >: Id[_ <: Int]] =
(Array.ofDim[String](1) : Array[_ >: Id[Nothing]])
}
Exception in thread "main" java.lang.ClassCastException: dotty.tools.dotc.core.Types$LambdaParam cannot be cast to dotty.tools.dotc.core.Symbols$Symbol
at dotty.tools.dotc.core.TypeComparer.compareCaptured$1(TypeComparer.scala:884)
at dotty.tools.dotc.core.TypeComparer.isSubArg$1(TypeComparer.scala:896)
at dotty.tools.dotc.core.TypeComparer.isSubArgs(TypeComparer.scala:905)
at dotty.tools.dotc.core.TypeComparer.isMatchingApply$1(TypeComparer.scala:685)
at dotty.tools.dotc.core.TypeComparer.compareAppliedType2$1(TypeComparer.scala:789)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:405)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:363)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:285)
at dotty.tools.dotc.core.TypeComparer.$anonfun$recur$2(TypeComparer.scala:853)
at scala.runtime.java8.JFunction0$mcZ$sp.apply(JFunction0$mcZ$sp.java:12)
at dotty.tools.dotc.reporting.trace$.op1$3(trace.scala:32)
at dotty.tools.dotc.reporting.trace$.apply(trace.scala:33)
at dotty.tools.dotc.reporting.trace$.apply(trace.scala:39)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:129)
at dotty.tools.dotc.core.TypeComparer.isSubType(TypeComparer.scala:124)
at dotty.tools.dotc.core.TypeComparer.isSubType(TypeComparer.scala:127)
at dotty.tools.dotc.core.TypeComparer.topLevelSubType(TypeComparer.scala:110)
at dotty.tools.dotc.core.Types$Type.$anonfun$$less$colon$less$1(Types.scala:774)
at scala.runtime.java8.JFunction0$mcZ$sp.apply(JFunction0$mcZ$sp.java:12)
at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
at dotty.tools.dotc.core.Types$Type.$less$colon$less(Types.scala:774)
at dotty.tools.dotc.core.Types$TypeBounds.contains(Types.scala:3572)
at dotty.tools.dotc.core.TypeComparer.isSubArg$1(TypeComparer.scala:892)
at dotty.tools.dotc.core.TypeComparer.isSubArgs(TypeComparer.scala:905)
at dotty.tools.dotc.core.TypeComparer.isMatchingApply$1(TypeComparer.scala:685)
at dotty.tools.dotc.core.TypeComparer.compareAppliedType2$1(TypeComparer.scala:789)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:405)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:363)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:285)
at dotty.tools.dotc.core.TypeComparer.$anonfun$recur$2(TypeComparer.scala:853)
at scala.runtime.java8.JFunction0$mcZ$sp.apply(JFunction0$mcZ$sp.java:12)
at dotty.tools.dotc.reporting.trace$.op1$3(trace.scala:32)
at dotty.tools.dotc.reporting.trace$.apply(trace.scala:33)
at dotty.tools.dotc.reporting.trace$.apply(trace.scala:39)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:129)
at dotty.tools.dotc.core.TypeComparer.isSubType(TypeComparer.scala:124)
at dotty.tools.dotc.core.TypeComparer.isSubType(TypeComparer.scala:127)
at dotty.tools.dotc.core.TypeComparer.topLevelSubType(TypeComparer.scala:110)
at dotty.tools.dotc.core.Types$Type.$anonfun$$less$colon$less$1(Types.scala:774)
at scala.runtime.java8.JFunction0$mcZ$sp.apply(JFunction0$mcZ$sp.java:12)
at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
at dotty.tools.dotc.core.Types$Type.$less$colon$less(Types.scala:774)
at dotty.tools.dotc.typer.Typer.adaptNoArgsOther$1(Typer.scala:2330)
at dotty.tools.dotc.typer.Typer.adaptNoArgs$1(Typer.scala:2398)
at dotty.tools.dotc.typer.Typer.adapt1(Typer.scala:2529)
at dotty.tools.dotc.typer.Typer.$anonfun$adapt$1(Typer.scala:2075)
at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
at dotty.tools.dotc.typer.Typer.adapt(Typer.scala:2070)
at dotty.tools.dotc.typer.Typer.$anonfun$typed$2(Typer.scala:1860)
at dotty.tools.dotc.reporting.trace$.op1$3(trace.scala:32)
at dotty.tools.dotc.reporting.trace$.apply(trace.scala:33)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1856)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1868)
at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:1928)
at dotty.tools.dotc.typer.Typer.$anonfun$typedValDef$1(Typer.scala:1370)
at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
at dotty.tools.dotc.typer.Typer.typedValDef(Typer.scala:1364)
at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1762)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1828)
at dotty.tools.dotc.typer.Typer.$anonfun$typed$2(Typer.scala:1860)
at dotty.tools.dotc.reporting.trace$.op1$3(trace.scala:32)
at dotty.tools.dotc.reporting.trace$.apply(trace.scala:33)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1856)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1868)
at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1887)
at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1916)
at dotty.tools.dotc.typer.Typer.$anonfun$typedClassDef$1(Typer.scala:1529)
at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
at dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:1455)
at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1768)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1828)
at dotty.tools.dotc.typer.Typer.$anonfun$typed$2(Typer.scala:1860)
at dotty.tools.dotc.reporting.trace$.op1$3(trace.scala:32)
at dotty.tools.dotc.reporting.trace$.apply(trace.scala:33)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1856)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1868)
at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1887)
at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1916)
at dotty.tools.dotc.typer.Typer.$anonfun$typedPackageDef$1(Typer.scala:1636)
at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
at dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:1627)
at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:1808)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1829)
at dotty.tools.dotc.typer.Typer.$anonfun$typed$2(Typer.scala:1860)
at dotty.tools.dotc.reporting.trace$.op1$3(trace.scala:32)
at dotty.tools.dotc.reporting.trace$.apply(trace.scala:33)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1856)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1868)
at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:1928)
at dotty.tools.dotc.typer.FrontEnd.$anonfun$typeCheck$1(FrontEnd.scala:66)
at dotty.tools.dotc.typer.FrontEnd.monitor(FrontEnd.scala:34)
at dotty.tools.dotc.typer.FrontEnd.typeCheck(FrontEnd.scala:64)
at dotty.tools.dotc.typer.FrontEnd.$anonfun$runOn$7(FrontEnd.scala:95)
at dotty.tools.dotc.typer.FrontEnd.$anonfun$runOn$7$adapted(FrontEnd.scala:95)
at scala.collection.immutable.List.foreach(List.scala:389)
at dotty.tools.dotc.typer.FrontEnd.runOn(FrontEnd.scala:95)
at dotty.tools.dotc.Run.$anonfun$compileUnits$3(Run.scala:174)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at dotty.tools.dotc.util.Stats$.trackTime(Stats.scala:47)
at dotty.tools.dotc.Run.$anonfun$compileUnits$2(Run.scala:171)
at dotty.tools.dotc.Run.$anonfun$compileUnits$2$adapted(Run.scala:169)
at scala.collection.IndexedSeqOptimized.foreach(IndexedSeqOptimized.scala:32)
at scala.collection.IndexedSeqOptimized.foreach$(IndexedSeqOptimized.scala:29)
at scala.collection.mutable.ArrayOps$ofRef.foreach(ArrayOps.scala:191)
at dotty.tools.dotc.Run.runPhases$1(Run.scala:169)
at dotty.tools.dotc.Run.$anonfun$compileUnits$1(Run.scala:194)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:88)
at dotty.tools.dotc.Run.compileUnits(Run.scala:149)
at dotty.tools.dotc.Run.compileSources(Run.scala:136)
at dotty.tools.dotc.Run.compile(Run.scala:120)
at dotty.tools.dotc.Driver.doCompile(Driver.scala:29)
at dotty.tools.dotc.Driver.process(Driver.scala:127)
at dotty.tools.dotc.Driver.process(Driver.scala:96)
at dotty.tools.dotc.Driver.process(Driver.scala:108)
at dotty.tools.dotc.Driver.main(Driver.scala:135)
at dotty.tools.dotc.Main.main(Main.scala)