Open
Description
Compiler version
Scala compiler version 3.0.0-M3
Minimized code
This code is inspired by tests/pos/i5735.scala
.
type Nested[X, P[_, _], N] = X match {
case N => N
case P[a, b] => P[a, Nested[b, P, N]]
}
def foo[T, Y >: T <: Nested[T, Tuple2, Unit]](t: T): T = t
Output
It can be compiled without -Yno-deep-subtypes
. But with -Yno-deep-subtypes
, the result is
assertion failure for Any <:< Unit, frozen = true
assertion failure for T <:< Unit, frozen = true
assertion failure for Nested[T, [T1, T2] =>> (T1, T2), Unit] <:< Unit, frozen = true
assertion failure for T <:< Unit, frozen = true
assertion failure for Nested[T, [T1, T2] =>> (T1, T2), Unit] <:< Unit, frozen = true
...
...
Expectation
It seems that the assertion failure occurs when the compiler checks Y <: Nested[T, Tuple2, Unit]
.