Closed
Description
object Fail {
case class So[+T]()
def main(args: Array[String]): Unit = {
So[Int]() match {
case p@So[_] => Console.println("Yep")
case _ => Console.println("Nope")
}
}
}
Compiler says,
exception occurred while typechecking /path/to/Src.scala
exception occurred while compiling /path/to/Src.scala
Works well if underscore in pattern matching is replaced with a specific type.