You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.