Unexpected pattern match compile error for generic case class #11132
Labels
fixed in Scala 3
This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)
patmat
should compile
typer
Milestone
The following code fails to compile for scala 2.12.6 and 2.13.0-M5:
The compiler reports:
The code compiles by refining the type
c
fromval c: Any
toval c: C[_]
.(In Dotty, the result is exactly the opposite. Matching on
c: Any
works, while matching onc: C[_]
fails.)The text was updated successfully, but these errors were encountered: