Open Katrix opened 3 years ago
This fails too:
trait Foo1[A]
trait Foo2[A]
trait Foo3[A]
enum Amount[F[_]]:
case ZeroOrOne extends Amount[Foo1]
case ExactlyOne extends Amount[Foo2]
case OneOrMore extends Amount[Foo3]
I tried running with a -Xss set to 1g and it takes a very long time but approaches Recursion limit as well.
However, this passes:
trait Foo1[A]
trait Foo2[A]
enum Amount[F[_]]:
case ZeroOrOne extends Amount[Foo1]
case ExactlyOne extends Amount[Foo2]
Funnily enough this passes too:
trait Foo1[A]
trait Foo2[A]
trait Foo3[A]
trait Foo4[A]
enum Amount[F[_]]:
case W extends Amount[Foo1]
case X extends Amount[Foo2]
case Y extends Amount[Foo3]
case Z extends Amount[Foo4]
For those interested in stack trace:
// test
trait Foo1[A]
trait Foo2[A]
trait Foo3[A]
enum Bar[F[_]]:
case Bar1 extends Bar[Foo1]
case Bar2 extends Bar[Foo2]
case Bar3 extends Bar[Foo3]
assertion failedmpiler / Test / testOnly 1s
at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:11)
at dotty.tools.dotc.core.TypeComparer.monitoredIsSubType$1(TypeComparer.scala:247)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.compareTypeLambda$1(TypeComparer.scala:722)
at dotty.tools.dotc.core.TypeComparer.thirdTry$1(TypeComparer.scala:730)
at dotty.tools.dotc.core.TypeComparer.secondTry$1(TypeComparer.scala:538)
at dotty.tools.dotc.core.TypeComparer.firstTry$1(TypeComparer.scala:398)
at dotty.tools.dotc.core.TypeComparer.recur(TypeComparer.scala:1457)
at dotty.tools.dotc.core.TypeComparer.isSubType(TypeComparer.scala:208)
at dotty.tools.dotc.core.TypeComparer.isSubType(TypeComparer.scala:218)
at dotty.tools.dotc.core.TypeComparer.isSameType(TypeComparer.scala:2162)
at dotty.tools.dotc.core.TypeComparer.isSame(TypeComparer.scala:2169)
at dotty.tools.dotc.core.ConstraintHandling.op$proxy4$1(ConstraintHandling.scala:464)
at dotty.tools.dotc.core.ConstraintHandling.isSameTypeWhenFrozen(ConstraintHandling.scala:464)
at dotty.tools.dotc.core.ConstraintHandling.isSameTypeWhenFrozen$(ConstraintHandling.scala:29)
at dotty.tools.dotc.core.TypeComparer.isSameTypeWhenFrozen(TypeComparer.scala:30)
at dotty.tools.dotc.core.TypeComparer.singletonInterval(TypeComparer.scala:2203)
at dotty.tools.dotc.core.TypeComparer.lubArgs(TypeComparer.scala:2304)
at dotty.tools.dotc.core.TypeComparer$.lubArgs(TypeComparer.scala:2965)
at dotty.tools.dotc.core.TypeOps$.mergeRefinedOrApplied$1(TypeOps.scala:272)
at dotty.tools.dotc.core.TypeOps$.orDominator(TypeOps.scala:393)
at dotty.tools.dotc.core.Types$OrType.join(Types.scala:3407)
at dotty.tools.dotc.core.Types$OrType.widenUnionWithoutNull(Types.scala:3423)
at dotty.tools.dotc.core.Types$Type.widenUnion(Types.scala:1294)
at dotty.tools.dotc.core.ConstraintHandling.widenOr$1(ConstraintHandling.scala:652)
at dotty.tools.dotc.core.ConstraintHandling.widenInferred(ConstraintHandling.scala:668)
at dotty.tools.dotc.core.ConstraintHandling.widenInferred$(ConstraintHandling.scala:29)
at dotty.tools.dotc.core.TypeComparer.widenInferred(TypeComparer.scala:30)
at dotty.tools.dotc.core.TypeComparer$.widenInferred(TypeComparer.scala:3016)
at dotty.tools.dotc.typer.Namer.rhsType$1(Namer.scala:1892)
at dotty.tools.dotc.typer.Namer.cookedRhsType$1(Namer.scala:1898)
at dotty.tools.dotc.typer.Namer.lhsType$1(Namer.scala:1899)
at dotty.tools.dotc.typer.Namer.inferredResultType(Namer.scala:1910)
at dotty.tools.dotc.typer.Namer.inferredType$1(Namer.scala:1657)
at dotty.tools.dotc.typer.Namer.valOrDefDefSig(Namer.scala:1664)
at dotty.tools.dotc.typer.Namer.defDefSig(Namer.scala:1755)
at dotty.tools.dotc.typer.Namer$Completer.typeSig(Namer.scala:787)
at dotty.tools.dotc.typer.Namer$Completer.completeInCreationContext(Namer.scala:922)
at dotty.tools.dotc.typer.Namer$Completer.complete(Namer.scala:810)
at dotty.tools.dotc.core.SymDenotations$SymDenotation.completeFrom(SymDenotations.scala:174)
at dotty.tools.dotc.core.Denotations$Denotation.completeInfo$1(Denotations.scala:187)
at dotty.tools.dotc.core.Denotations$Denotation.info(Denotations.scala:189)
at dotty.tools.dotc.core.SymDenotations$SymDenotation.ensureCompleted(SymDenotations.scala:390)
at dotty.tools.dotc.typer.Typer.retrieveSym(Typer.scala:2891)
at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2916)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3012)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3080)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3084)
at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:3106)
at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3152)
at dotty.tools.dotc.typer.Typer.typedClassDef(Typer.scala:2584)
at dotty.tools.dotc.typer.Typer.typedTypeOrClassDef$1(Typer.scala:2938)
at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2942)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3012)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3080)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3084)
at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:3106)
at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:3152)
at dotty.tools.dotc.typer.Typer.typedPackageDef(Typer.scala:2714)
at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2983)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:3013)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3080)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:3084)
at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:3196)
at dotty.tools.dotc.typer.TyperPhase.typeCheck$$anonfun$1(TyperPhase.scala:44)
at dotty.tools.dotc.typer.TyperPhase.typeCheck$$anonfun$adapted$1(TyperPhase.scala:54)
at scala.Function0.apply$mcV$sp(Function0.scala:42)
at dotty.tools.dotc.core.Phases$Phase.monitor(Phases.scala:437)
at dotty.tools.dotc.typer.TyperPhase.typeCheck(TyperPhase.scala:54)
at dotty.tools.dotc.typer.TyperPhase.runOn$$anonfun$3(TyperPhase.scala:88)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:333)
at dotty.tools.dotc.typer.TyperPhase.runOn(TyperPhase.scala:88)
at dotty.tools.dotc.Run.runPhases$1$$anonfun$1(Run.scala:247)
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:1321)
at dotty.tools.dotc.Run.runPhases$1(Run.scala:263)
at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:271)
at dotty.tools.dotc.Run.compileUnits$$anonfun$adapted$1(Run.scala:280)
at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:67)
at dotty.tools.dotc.Run.compileUnits(Run.scala:280)
at dotty.tools.dotc.Run.compileSources(Run.scala:195)
at dotty.tools.dotc.Run.compile(Run.scala:179)
at dotty.tools.dotc.Driver.doCompile(Driver.scala:35)
at dotty.tools.dotc.Driver.process(Driver.scala:195)
at dotty.tools.dotc.Driver.process(Driver.scala:163)
at dotty.tools.vulpix.ParallelTesting$Test.compile(ParallelTesting.scala:533)
at dotty.tools.vulpix.ParallelTesting$CompilationLogic.compileTestSource$$anonfun$1(ParallelTesting.scala:230)
at scala.util.Try$.apply(Try.scala:210)
recur.trace in TypeComparer
==> isSubType <empty>.type <:< a type that can be selected or applied?
<== isSubType <empty>.type <:< a type that can be selected or applied = true
[ ] completed (0/1, 0 failed, 0s)==> isSubType scala.reflect.Enum <:< AnyTypeConstructorProto?
<== isSubType scala.reflect.Enum <:< AnyTypeConstructorProto = true
==> isSubType Bar.type <:< a type that can be selected or applied?
<== isSubType Bar.type <:< a type that can be selected or applied = true
==> isSubType Bar.type <:< a type that can be selected or applied?
<== isSubType Bar.type <:< a type that can be selected or applied = true
==> isSubType AnyRef <:< AnyTypeConstructorProto?
<== isSubType AnyRef <:< AnyTypeConstructorProto = true
==> isSubType Bar.type <:< a type that can be selected or applied?
<== isSubType Bar.type <:< a type that can be selected or applied = true
==> isSubType _root_.type <:< ?{ scala: ? }?
==> isSubType scala.type <:< ??
<== isSubType scala.type <:< ? = true
<== isSubType _root_.type <:< ?{ scala: ? } = true
==> isSubType scala.type <:< ?{ runtime: ? }?
==> isSubType runtime.type <:< ??
<== isSubType runtime.type <:< ? = true
<== isSubType scala.type <:< ?{ runtime: ? } = true
==> isSubType runtime.type <:< ?{ EnumValue: ? }?
==> isSubType runtime.EnumValue <:< ??
<== isSubType runtime.EnumValue <:< ? = true
<== isSubType runtime.type <:< ?{ EnumValue: ? } = true
==> isSubType Bar <:< AnyTypeConstructorProto?
<== isSubType Bar <:< AnyTypeConstructorProto = true
==> isSubType Bar[Foo1] <:< AnyTypeConstructorProto?
<== isSubType Bar[Foo1] <:< AnyTypeConstructorProto = true
==> isSubType runtime.EnumValue <:< Bar[Foo1]?
<== isSubType runtime.EnumValue <:< Bar[Foo1] = false
==> isSubType Bar[Foo1] <:< runtime.EnumValue?
<== isSubType Bar[Foo1] <:< runtime.EnumValue = false
==> isSubType Bar[Foo1] with runtime.EnumValue {...} <:< Bar[Foo1] & runtime.EnumValue?
==> isSubType Bar[Foo1] with runtime.EnumValue {...} <:< Bar[Foo1]?
==> isSubType Bar[Foo1] <:< Bar[Foo1] (left is approximated)?
<== isSubType Bar[Foo1] <:< Bar[Foo1] (left is approximated) = true
<== isSubType Bar[Foo1] with runtime.EnumValue {...} <:< Bar[Foo1] = true
==> isSubType Bar[Foo1] with runtime.EnumValue {...} <:< runtime.EnumValue?
==> isSubType scala.runtime.EnumValue <:< runtime.EnumValue (left is approximated)?
==> isSubType (scala.runtime : runtime.type) <:< runtime.type?
<== isSubType (scala.runtime : runtime.type) <:< runtime.type = true
<== isSubType scala.runtime.EnumValue <:< runtime.EnumValue (left is approximated) = true
<== isSubType Bar[Foo1] with runtime.EnumValue {...} <:< runtime.EnumValue = true
<== isSubType Bar[Foo1] with runtime.EnumValue {...} <:< Bar[Foo1] & runtime.EnumValue = true
==> isSubType runtime.EnumValue <:< Bar[Foo1]?
<== isSubType runtime.EnumValue <:< Bar[Foo1] = false
==> isSubType Bar[Foo1] <:< runtime.EnumValue?
<== isSubType Bar[Foo1] <:< runtime.EnumValue = false
==> isSubType runtime.EnumValue <:< Bar[Foo1]?
<== isSubType runtime.EnumValue <:< Bar[Foo1] = false
==> isSubType Bar[Foo1] <:< runtime.EnumValue?
<== isSubType Bar[Foo1] <:< runtime.EnumValue = false
==> isSubType runtime.EnumValue <:< Bar[Foo1]?
<== isSubType runtime.EnumValue <:< Bar[Foo1] = false
==> isSubType Bar[Foo1] <:< runtime.EnumValue?
<== isSubType Bar[Foo1] <:< runtime.EnumValue = false
==> isSubType runtime.EnumValue <:< Bar[Foo1]?
<== isSubType runtime.EnumValue <:< Bar[Foo1] = false
==> isSubType Bar[Foo1] & runtime.EnumValue <:< Bar[Foo1]?
==> isSubType Bar[Foo1] <:< Bar[Foo1] (left is approximated)?
<== isSubType Bar[Foo1] <:< Bar[Foo1] (left is approximated) = true
<== isSubType Bar[Foo1] & runtime.EnumValue <:< Bar[Foo1] = true
==> isSubType _root_.type <:< ?{ scala: ? }?
==> isSubType scala.type <:< ??
<== isSubType scala.type <:< ? = true
<== isSubType _root_.type <:< ?{ scala: ? } = true
==> isSubType scala.type <:< ?{ runtime: ? }?
==> isSubType runtime.type <:< ??
<== isSubType runtime.type <:< ? = true
<== isSubType scala.type <:< ?{ runtime: ? } = true
==> isSubType runtime.type <:< ?{ EnumValue: ? }?
==> isSubType runtime.EnumValue <:< ??
<== isSubType runtime.EnumValue <:< ? = true
<== isSubType runtime.type <:< ?{ EnumValue: ? } = true
==> isSubType Bar <:< AnyTypeConstructorProto?
<== isSubType Bar <:< AnyTypeConstructorProto = true
==> isSubType Bar[Foo2] <:< AnyTypeConstructorProto?
<== isSubType Bar[Foo2] <:< AnyTypeConstructorProto = true
==> isSubType runtime.EnumValue <:< Bar[Foo2]?
<== isSubType runtime.EnumValue <:< Bar[Foo2] = false
==> isSubType Bar[Foo2] <:< runtime.EnumValue?
<== isSubType Bar[Foo2] <:< runtime.EnumValue = false
==> isSubType Bar[Foo2] with runtime.EnumValue {...} <:< Bar[Foo2] & runtime.EnumValue?
==> isSubType Bar[Foo2] with runtime.EnumValue {...} <:< Bar[Foo2]?
==> isSubType Bar[Foo2] <:< Bar[Foo2] (left is approximated)?
<== isSubType Bar[Foo2] <:< Bar[Foo2] (left is approximated) = true
<== isSubType Bar[Foo2] with runtime.EnumValue {...} <:< Bar[Foo2] = true
==> isSubType Bar[Foo2] with runtime.EnumValue {...} <:< runtime.EnumValue?
==> isSubType scala.runtime.EnumValue <:< runtime.EnumValue (left is approximated)?
==> isSubType (scala.runtime : runtime.type) <:< runtime.type?
<== isSubType (scala.runtime : runtime.type) <:< runtime.type = true
<== isSubType scala.runtime.EnumValue <:< runtime.EnumValue (left is approximated) = true
<== isSubType Bar[Foo2] with runtime.EnumValue {...} <:< runtime.EnumValue = true
<== isSubType Bar[Foo2] with runtime.EnumValue {...} <:< Bar[Foo2] & runtime.EnumValue = true
==> isSubType runtime.EnumValue <:< Bar[Foo2]?
<== isSubType runtime.EnumValue <:< Bar[Foo2] = false
==> isSubType Bar[Foo2] <:< runtime.EnumValue?
<== isSubType Bar[Foo2] <:< runtime.EnumValue = false
==> isSubType runtime.EnumValue <:< Bar[Foo2]?
<== isSubType runtime.EnumValue <:< Bar[Foo2] = false
==> isSubType Bar[Foo2] <:< runtime.EnumValue?
<== isSubType Bar[Foo2] <:< runtime.EnumValue = false
==> isSubType runtime.EnumValue <:< Bar[Foo2]?
<== isSubType runtime.EnumValue <:< Bar[Foo2] = false
==> isSubType Bar[Foo2] <:< runtime.EnumValue?
<== isSubType Bar[Foo2] <:< runtime.EnumValue = false
==> isSubType runtime.EnumValue <:< Bar[Foo2]?
<== isSubType runtime.EnumValue <:< Bar[Foo2] = false
==> isSubType Bar[Foo2] & runtime.EnumValue <:< Bar[Foo2]?
==> isSubType Bar[Foo2] <:< Bar[Foo2] (left is approximated)?
<== isSubType Bar[Foo2] <:< Bar[Foo2] (left is approximated) = true
<== isSubType Bar[Foo2] & runtime.EnumValue <:< Bar[Foo2] = true
==> isSubType _root_.type <:< ?{ scala: ? }?
==> isSubType scala.type <:< ??
<== isSubType scala.type <:< ? = true
<== isSubType _root_.type <:< ?{ scala: ? } = true
==> isSubType scala.type <:< ?{ runtime: ? }?
==> isSubType runtime.type <:< ??
<== isSubType runtime.type <:< ? = true
<== isSubType scala.type <:< ?{ runtime: ? } = true
==> isSubType runtime.type <:< ?{ EnumValue: ? }?
==> isSubType runtime.EnumValue <:< ??
<== isSubType runtime.EnumValue <:< ? = true
<== isSubType runtime.type <:< ?{ EnumValue: ? } = true
==> isSubType Bar <:< AnyTypeConstructorProto?
<== isSubType Bar <:< AnyTypeConstructorProto = true
==> isSubType Bar[Foo3] <:< AnyTypeConstructorProto?
<== isSubType Bar[Foo3] <:< AnyTypeConstructorProto = true
==> isSubType runtime.EnumValue <:< Bar[Foo3]?
<== isSubType runtime.EnumValue <:< Bar[Foo3] = false
==> isSubType Bar[Foo3] <:< runtime.EnumValue?
<== isSubType Bar[Foo3] <:< runtime.EnumValue = false
==> isSubType Bar[Foo3] with runtime.EnumValue {...} <:< Bar[Foo3] & runtime.EnumValue?
==> isSubType Bar[Foo3] with runtime.EnumValue {...} <:< Bar[Foo3]?
==> isSubType Bar[Foo3] <:< Bar[Foo3] (left is approximated)?
<== isSubType Bar[Foo3] <:< Bar[Foo3] (left is approximated) = true
<== isSubType Bar[Foo3] with runtime.EnumValue {...} <:< Bar[Foo3] = true
==> isSubType Bar[Foo3] with runtime.EnumValue {...} <:< runtime.EnumValue?
==> isSubType scala.runtime.EnumValue <:< runtime.EnumValue (left is approximated)?
==> isSubType (scala.runtime : runtime.type) <:< runtime.type?
<== isSubType (scala.runtime : runtime.type) <:< runtime.type = true
<== isSubType scala.runtime.EnumValue <:< runtime.EnumValue (left is approximated) = true
<== isSubType Bar[Foo3] with runtime.EnumValue {...} <:< runtime.EnumValue = true
<== isSubType Bar[Foo3] with runtime.EnumValue {...} <:< Bar[Foo3] & runtime.EnumValue = true
==> isSubType runtime.EnumValue <:< Bar[Foo3]?
<== isSubType runtime.EnumValue <:< Bar[Foo3] = false
==> isSubType Bar[Foo3] <:< runtime.EnumValue?
<== isSubType Bar[Foo3] <:< runtime.EnumValue = false
==> isSubType runtime.EnumValue <:< Bar[Foo3]?
<== isSubType runtime.EnumValue <:< Bar[Foo3] = false
==> isSubType Bar[Foo3] <:< runtime.EnumValue?
<== isSubType Bar[Foo3] <:< runtime.EnumValue = false
==> isSubType runtime.EnumValue <:< Bar[Foo3]?
<== isSubType runtime.EnumValue <:< Bar[Foo3] = false
==> isSubType Bar[Foo3] <:< runtime.EnumValue?
<== isSubType Bar[Foo3] <:< runtime.EnumValue = false
==> isSubType runtime.EnumValue <:< Bar[Foo3]?
<== isSubType runtime.EnumValue <:< Bar[Foo3] = false
==> isSubType Bar[Foo3] & runtime.EnumValue <:< Bar[Foo3]?
==> isSubType Bar[Foo3] <:< Bar[Foo3] (left is approximated)?
<== isSubType Bar[Foo3] <:< Bar[Foo3] (left is approximated) = true
<== isSubType Bar[Foo3] & runtime.EnumValue <:< Bar[Foo3] = true
==> isSubType Bar <:< AnyTypeConstructorProto?
<== isSubType Bar <:< AnyTypeConstructorProto = true
==> isSubType Array.type <:< ?{ apply: ? }?
==> isSubType (Array.apply : (x: Unit, xs: Unit*): Array[Unit]) <:< ??
<== isSubType (Array.apply : (x: Unit, xs: Unit*): Array[Unit]) <:< ? = true
<== isSubType Array.type <:< ?{ apply: ? } = true
==> isSubType (Bar : Bar.type) <:< ?{ Bar1: ? }?
==> isSubType (Bar.Bar1 : Bar[Foo1]) <:< ??
<== isSubType (Bar.Bar1 : Bar[Foo1]) <:< ? = true
<== isSubType (Bar : Bar.type) <:< ?{ Bar1: ? } = true
==> isSubType (Bar.Bar1 : Bar[Foo1]) <:< Bar[?[_$1]]?
==> isSubType Nothing <:< Foo1?
<== isSubType Nothing <:< Foo1 = true
==> isSubType Foo1 <:< [_] =>> Any?
==> isSubType <:< ?
<== isSubType <:< = true
==> isSubType Foo1[A] <:< Any?
<== isSubType Foo1[A] <:< Any = true
true
<== isSubType Foo1 <:< [_] =>> Any = true
<== isSubType (Bar.Bar1 : Bar[Foo1]) <:< Bar[?[_$1]] = true
==> isSubType (Bar : Bar.type) <:< ?{ Bar2: ? }?
==> isSubType (Bar.Bar2 : Bar[Foo2]) <:< ??
<== isSubType (Bar.Bar2 : Bar[Foo2]) <:< ? = true
<== isSubType (Bar : Bar.type) <:< ?{ Bar2: ? } = true
==> isSubType (Bar.Bar2 : Bar[Foo2]) <:< Bar[?[_$1]]?
==> isSubType Nothing <:< Foo2?
<== isSubType Nothing <:< Foo2 = true
==> isSubType Foo2 <:< [_] =>> Any?
==> isSubType <:< ?
<== isSubType <:< = true
==> isSubType Foo2[A] <:< Any?
<== isSubType Foo2[A] <:< Any = true
true
<== isSubType Foo2 <:< [_] =>> Any = true
<== isSubType (Bar.Bar2 : Bar[Foo2]) <:< Bar[?[_$1]] = true
==> isSubType (Bar : Bar.type) <:< ?{ Bar3: ? }?
==> isSubType (Bar.Bar3 : Bar[Foo3]) <:< ??
<== isSubType (Bar.Bar3 : Bar[Foo3]) <:< ? = true
<== isSubType (Bar : Bar.type) <:< ?{ Bar3: ? } = true
==> isSubType (Bar.Bar3 : Bar[Foo3]) <:< Bar[?[_$1]]?
==> isSubType Nothing <:< Foo3?
<== isSubType Nothing <:< Foo3 = true
==> isSubType Foo3 <:< [_] =>> Any?
==> isSubType <:< ?
<== isSubType <:< = true
==> isSubType Foo3[A] <:< Any?
<== isSubType Foo3[A] <:< Any = true
true
<== isSubType Foo3 <:< [_] =>> Any = true
<== isSubType (Bar.Bar3 : Bar[Foo3]) <:< Bar[?[_$1]] = true
==> isSubType (Bar.Bar1 : Bar[Foo1]) <:< Bar[?[_$1]]?
==> isSubType Nothing <:< Foo1?
<== isSubType Nothing <:< Foo1 = true
==> isSubType Foo1 <:< [_] =>> Any?
==> isSubType <:< ?
<== isSubType <:< = true
==> isSubType Foo1[A] <:< Any?
<== isSubType Foo1[A] <:< Any = true
true
<== isSubType Foo1 <:< [_] =>> Any = true
<== isSubType (Bar.Bar1 : Bar[Foo1]) <:< Bar[?[_$1]] = true
==> isSubType (Bar.Bar2 : Bar[Foo2]) <:< Bar[?[_$1]]?
==> isSubType Nothing <:< Foo2?
<== isSubType Nothing <:< Foo2 = true
==> isSubType Foo2 <:< [_] =>> Any?
==> isSubType <:< ?
<== isSubType <:< = true
==> isSubType Foo2[A] <:< Any?
<== isSubType Foo2[A] <:< Any = true
true
<== isSubType Foo2 <:< [_] =>> Any = true
<== isSubType (Bar.Bar2 : Bar[Foo2]) <:< Bar[?[_$1]] = true
==> isSubType (Bar.Bar3 : Bar[Foo3]) <:< Bar[?[_$1]]?
==> isSubType Nothing <:< Foo3?
<== isSubType Nothing <:< Foo3 = true
==> isSubType Foo3 <:< [_] =>> Any?
==> isSubType <:< ?
<== isSubType <:< = true
==> isSubType Foo3[A] <:< Any?
<== isSubType Foo3[A] <:< Any = true
true
<== isSubType Foo3 <:< [_] =>> Any = true
<== isSubType (Bar.Bar3 : Bar[Foo3]) <:< Bar[?[_$1]] = true
==> isSubType Bar <:< AnyTypeConstructorProto?
<== isSubType Bar <:< AnyTypeConstructorProto = true
==> isSubType Bar <:< AnyTypeConstructorProto?
<== isSubType Bar <:< AnyTypeConstructorProto = true
==> isSubType (classOf[Bar[?[_$1]]] : Class[Bar[?[_$1]]]) <:< Class[?]?
==> isSubType Nothing <:< Bar[?[_$1]]?
<== isSubType Nothing <:< Bar[?[_$1]] = true
==> isSubType Bar[?[_$1]] <:< Any?
<== isSubType Bar[?[_$1]] <:< Any = true
<== isSubType (classOf[Bar[?[_$1]]] : Class[Bar[?[_$1]]]) <:< Class[?] = true
==> isSubType (classOf[Bar[?[_$1]]] : Class[Bar[?[_$1]]]) <:< Class[?]?
==> isSubType Nothing <:< Bar[?[_$1]]?
<== isSubType Nothing <:< Bar[?[_$1]] = true
==> isSubType Bar[?[_$1]] <:< Any?
<== isSubType Bar[?[_$1]] <:< Any = true
<== isSubType (classOf[Bar[?[_$1]]] : Class[Bar[?[_$1]]]) <:< Class[?] = true
==> isSubType Array <:< AnyTypeConstructorProto?
<== isSubType Array <:< AnyTypeConstructorProto = true
==> isSubType Bar <:< AnyTypeConstructorProto?
<== isSubType Bar <:< AnyTypeConstructorProto = true
==> isSubType (Bar.$values : Array[Bar[?[_$1]]]) <:< ?{ clone: ? }?
==> isSubType (Bar.$values.clone : (): Array[Bar[?[_$1]]]) <:< ??
<== isSubType (Bar.$values.clone : (): Array[Bar[?[_$1]]]) <:< ? = true
<== isSubType (Bar.$values : Array[Bar[?[_$1]]]) <:< ?{ clone: ? } = true
==> isSubType String <:< ("Bar1" : String)?
<== isSubType String <:< ("Bar1" : String) = false
==> isSubType String <:< String?
<== isSubType String <:< String = true
==> isSubType String <:< String?
<== isSubType String <:< String = true
==> isSubType ("Bar1" : String) <:< ?{ == : ? }?
==> isSubType ("Bar1".== : (x$0: Any): Boolean) <:< ??
<== isSubType ("Bar1".== : (x$0: Any): Boolean) <:< ? = true
<== isSubType ("Bar1" : String) <:< ?{ == : ? } = true
==> isSubType String <:< Any?
<== isSubType String <:< Any = true
==> isSubType String <:< Any?
<== isSubType String <:< Any = true
==> isSubType (false : Boolean) <:< Boolean?
==> isSubType Boolean <:< Boolean (left is approximated)?
<== isSubType Boolean <:< Boolean (left is approximated) = true
<== isSubType (false : Boolean) <:< Boolean = true
==> isSubType (Bar : Bar.type) <:< ?{ Bar1: ? }?
==> isSubType (Bar.Bar1 : Bar[Foo1]) <:< ??
<== isSubType (Bar.Bar1 : Bar[Foo1]) <:< ? = true
<== isSubType (Bar : Bar.type) <:< ?{ Bar1: ? } = true
==> isSubType String <:< ("Bar2" : String)?
<== isSubType String <:< ("Bar2" : String) = false
==> isSubType String <:< String?
<== isSubType String <:< String = true
==> isSubType String <:< String?
<== isSubType String <:< String = true
==> isSubType ("Bar2" : String) <:< ?{ == : ? }?
==> isSubType ("Bar2".== : (x$0: Any): Boolean) <:< ??
<== isSubType ("Bar2".== : (x$0: Any): Boolean) <:< ? = true
<== isSubType ("Bar2" : String) <:< ?{ == : ? } = true
==> isSubType String <:< Any?
<== isSubType String <:< Any = true
==> isSubType String <:< Any?
<== isSubType String <:< Any = true
==> isSubType (false : Boolean) <:< Boolean?
==> isSubType Boolean <:< Boolean (left is approximated)?
<== isSubType Boolean <:< Boolean (left is approximated) = true
<== isSubType (false : Boolean) <:< Boolean = true
==> isSubType (Bar : Bar.type) <:< ?{ Bar2: ? }?
==> isSubType (Bar.Bar2 : Bar[Foo2]) <:< ??
<== isSubType (Bar.Bar2 : Bar[Foo2]) <:< ? = true
<== isSubType (Bar : Bar.type) <:< ?{ Bar2: ? } = true
==> isSubType String <:< ("Bar3" : String)?
<== isSubType String <:< ("Bar3" : String) = false
==> isSubType String <:< String?
<== isSubType String <:< String = true
==> isSubType String <:< String?
<== isSubType String <:< String = true
==> isSubType ("Bar3" : String) <:< ?{ == : ? }?
==> isSubType ("Bar3".== : (x$0: Any): Boolean) <:< ??
<== isSubType ("Bar3".== : (x$0: Any): Boolean) <:< ? = true
<== isSubType ("Bar3" : String) <:< ?{ == : ? } = true
==> isSubType String <:< Any?
<== isSubType String <:< Any = true
==> isSubType String <:< Any?
<== isSubType String <:< Any = true
==> isSubType (false : Boolean) <:< Boolean?
==> isSubType Boolean <:< Boolean (left is approximated)?
<== isSubType Boolean <:< Boolean (left is approximated) = true
<== isSubType (false : Boolean) <:< Boolean = true
==> isSubType (Bar : Bar.type) <:< ?{ Bar3: ? }?
==> isSubType (Bar.Bar3 : Bar[Foo3]) <:< ??
<== isSubType (Bar.Bar3 : Bar[Foo3]) <:< ? = true
<== isSubType (Bar : Bar.type) <:< ?{ Bar3: ? } = true
==> isSubType ("enum case not found: " : String) <:< ?{ + : ? }?
==> isSubType ("enum case not found: ".+ : (x$0: Any): String) <:< ??
<== isSubType ("enum case not found: ".+ : (x$0: Any): String) <:< ? = true
<== isSubType ("enum case not found: " : String) <:< ?{ + : ? } = true
==> isSubType ($name : String) <:< Any?
<== isSubType ($name : String) <:< Any = true
==> isSubType ($name : String) <:< Any?
<== isSubType ($name : String) <:< Any = true
==> isSubType String <:< Throwable?
<== isSubType String <:< Throwable = false
==> isSubType IllegalArgumentException <:< Throwable?
==> isSubType Throwable <:< Throwable (left is approximated)?
<== isSubType Throwable <:< Throwable (left is approximated) = true
<== isSubType IllegalArgumentException <:< Throwable = true
==> isSubType IllegalArgumentException <:< Throwable?
==> isSubType Throwable <:< Throwable (left is approximated)?
<== isSubType Throwable <:< Throwable (left is approximated) = true
<== isSubType IllegalArgumentException <:< Throwable = true
==> isSubType IllegalArgumentException <:< Throwable?
==> isSubType Throwable <:< Throwable (left is approximated)?
<== isSubType Throwable <:< Throwable (left is approximated) = true
<== isSubType IllegalArgumentException <:< Throwable = true
==> isSubType Bar[Foo2] <:< Bar[Foo1]?
==> isSubType Foo1 <:< Foo2?
==> isSubType <:< ?
<== isSubType <:< = true
==> isSubType Foo1[A] <:< Foo2[A]?
<== isSubType Foo1[A] <:< Foo2[A] = false
false
<== isSubType Foo1 <:< Foo2 = false
<== isSubType Bar[Foo2] <:< Bar[Foo1] = false
==> isSubType Bar[Foo1] <:< Bar[Foo2]?
==> isSubType Foo2 <:< Foo1?
==> isSubType <:< ?
<== isSubType <:< = true
==> isSubType Foo2[A] <:< Foo1[A]?
<== isSubType Foo2[A] <:< Foo1[A] = false
false
<== isSubType Foo2 <:< Foo1 = false
<== isSubType Bar[Foo1] <:< Bar[Foo2] = false
==> isSubType Bar[Foo3] <:< Bar[Foo1] | Bar[Foo2]?
==> isSubType Bar[Foo3] <:< Bar[Foo1]?
==> isSubType Foo1 <:< Foo3?
==> isSubType <:< ?
<== isSubType <:< = true
==> isSubType Foo1[A] <:< Foo3[A]?
<== isSubType Foo1[A] <:< Foo3[A] = false
false
<== isSubType Foo1 <:< Foo3 = false
<== isSubType Bar[Foo3] <:< Bar[Foo1] = false
==> isSubType Bar[Foo3] <:< Bar[Foo2]?
==> isSubType Foo2 <:< Foo3?
==> isSubType <:< ?
<== isSubType <:< = true
==> isSubType Foo2[A] <:< Foo3[A]?
<== isSubType Foo2[A] <:< Foo3[A] = false
false
<== isSubType Foo2 <:< Foo3 = false
<== isSubType Bar[Foo3] <:< Bar[Foo2] = false
<== isSubType Bar[Foo3] <:< Bar[Foo1] | Bar[Foo2] = false
==> isSubType Bar[Foo1] | Bar[Foo2] <:< Bar[Foo3]?
==> isSubType Bar[Foo1] <:< Bar[Foo3]?
==> isSubType Foo3 <:< Foo1?
==> isSubType <:< ?
<== isSubType <:< = true
==> isSubType Foo3[A] <:< Foo1[A]?
<== isSubType Foo3[A] <:< Foo1[A] = false
false
<== isSubType Foo3 <:< Foo1 = false
<== isSubType Bar[Foo1] <:< Bar[Foo3] = false
<== isSubType Bar[Foo1] | Bar[Foo2] <:< Bar[Foo3] = false
==> isSubType Bar[Foo1] <:< Bar[Foo3]?
==> isSubType Foo3 <:< Foo1?
==> isSubType <:< ?
<== isSubType <:< = true
==> isSubType Foo3[A] <:< Foo1[A]?
<== isSubType Foo3[A] <:< Foo1[A] = false
false
<== isSubType Foo3 <:< Foo1 = false
<== isSubType Bar[Foo1] <:< Bar[Foo3] = false
==> isSubType Bar[Foo2] <:< Bar[Foo3]?
==> isSubType Foo3 <:< Foo2?
==> isSubType <:< ?
<== isSubType <:< = true
==> isSubType Foo3[A] <:< Foo2[A]?
<== isSubType Foo3[A] <:< Foo2[A] = false
false
<== isSubType Foo3 <:< Foo2 = false
<== isSubType Bar[Foo2] <:< Bar[Foo3] = false
==> isSubType Bar[Foo2] <:< Bar[Foo1]?
==> isSubType Foo1 <:< Foo2?
==> isSubType <:< ?
<== isSubType <:< = true
==> isSubType Foo1[A] <:< Foo2[A]?
<== isSubType Foo1[A] <:< Foo2[A] = false
false
<== isSubType Foo1 <:< Foo2 = false
<== isSubType Bar[Foo2] <:< Bar[Foo1] = false
==> isSubType Bar[Foo1] <:< Bar[Foo2]?
==> isSubType Foo2 <:< Foo1?
==> isSubType <:< ?
<== isSubType <:< = true
==> isSubType Foo2[A] <:< Foo1[A]?
<== isSubType Foo2[A] <:< Foo1[A] = false
false
<== isSubType Foo2 <:< Foo1 = false
<== isSubType Bar[Foo1] <:< Bar[Foo2] = false
==> isSubType Foo1 <:< Foo2?
==> isSubType <:< ?
<== isSubType <:< = true
==> isSubType Foo1[A] <:< Foo2[A]?
<== isSubType Foo1[A] <:< Foo2[A] = false
false
<== isSubType Foo1 <:< Foo2 = false
==> isSubType Foo2 <:< Foo1?
==> isSubType <:< ?
<== isSubType <:< = true
==> isSubType Foo2[A] <:< Foo1[A]?
<== isSubType Foo2[A] <:< Foo1[A] = false
false
<== isSubType Foo2 <:< Foo1 = false
==> isSubType Foo1 <:< Foo2?
==> isSubType <:< ?
<== isSubType <:< = true
==> isSubType Foo1[A] <:< Foo2[A]?
<== isSubType Foo1[A] <:< Foo2[A] = false
false
<== isSubType Foo1 <:< Foo2 = false
==> isSubType Nothing <:< Nothing?
<== isSubType Nothing <:< Nothing = true
==> isSubType Any <:< Any?
<== isSubType Any <:< Any = true
==> isSubType Foo2[X0] <:< Foo1[X0]?
<== isSubType Foo2[X0] <:< Foo1[X0] = false
==> isSubType Foo1[X0] <:< Foo2[X0]?
<== isSubType Foo1[X0] <:< Foo2[X0] = false
==> isSubType Foo2 <:< Foo1?
==> isSubType <:< ?
<== isSubType <:< = true
==> isSubType Foo2[A] <:< Foo1[A]?
<== isSubType Foo2[A] <:< Foo1[A] = false
false
<== isSubType Foo2 <:< Foo1 = false
==> isSubType Foo1 <:< Foo2?
==> isSubType <:< ?
<== isSubType <:< = true
==> isSubType Foo1[A] <:< Foo2[A]?
<== isSubType Foo1[A] <:< Foo2[A] = false
false
<== isSubType Foo1 <:< Foo2 = false
==> isSubType Nothing <:< Nothing?
<== isSubType Nothing <:< Nothing = true
==> isSubType Any <:< Any?
<== isSubType Any <:< Any = true
==> isSubType Foo2[X0] <:< Foo1[X0]?
<== isSubType Foo2[X0] <:< Foo1[X0] = false
==> isSubType Foo1[X0] <:< Foo2[X0]?
<== isSubType Foo1[X0] <:< Foo2[X0] = false
==> isSubType Bar[Foo3] <:< Bar[?[X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0]]?
==> isSubType [X0] =>> Foo1[X0] & Foo2[X0] <:< Foo3?
==> isSubType <:< ?
<== isSubType <:< = true
==> isSubType Foo1[X0] & Foo2[X0] <:< Foo3[X0]?
==> isSubType Foo1[X0] <:< Foo3[X0]?
<== isSubType Foo1[X0] <:< Foo3[X0] = false
==> isSubType Foo2[X0] <:< Foo3[X0]?
<== isSubType Foo2[X0] <:< Foo3[X0] = false
<== isSubType Foo1[X0] & Foo2[X0] <:< Foo3[X0] = false
false
<== isSubType [X0] =>> Foo1[X0] & Foo2[X0] <:< Foo3 = false
<== isSubType Bar[Foo3] <:< Bar[?[X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0]] = false
==> isSubType Bar[?[X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0]] <:< Bar[Foo3]?
<== isSubType Bar[?[X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0]] <:< Bar[Foo3] = false
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
Hmm is the issue with the Eta expansion? Shouldn't it be like this:
==> isSubType [X0] >: Foo1[X0] & Foo2[X0] <: Foo1[X0] | Foo2[X0] <:< Foo3?
==> isSubType [X0] =>> Foo1[X0] & Foo2[X0] <:< Foo3?
@dwijnand can you help tell me whether the expected eta expansion is correct?
I don't recognise that as "eta-expansion" and I can't tell you if it's correct. But I agree with you that it seems reasonable. You could look as to why that step is taken in Bar[Foo3] <:< Bar[?[X0] ...
but not when it's not nested.
Minimized code
Output
Expectation
It compiles. Rewriting it to a sealed trait works fine.