-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
fixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)patmat
Description
This is as far as I could minimize it. All remaining parts appear to be necessary:
object Test {
class A[+V]
case class B[V](value: C[V]) extends A[V]
class C[A](val value: A)
def f[V](a: A[V]): Unit =
a match {
case B(c: C[V]) => c.value match { case _: String => }
}
}
The compiler hangs in typer. Reproduced with 2.12.20, 2.12.21, 2.13.16, 2.13.18. I remember seeing a bug involving a nested pattern match that required types with certain variance before, but I can't remember the details and I didn't find it in the bug tracker.
It compiles in 3.7.4.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
fixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)patmat