fork download
  1. object Main extends App {
  2. val l: List[Any] = List("Yes")
  3.  
  4. l match {
  5. case x: List[Int] => print(x.getClass.getName)
  6. case _ => print("Could not match")
  7. }
  8. }
Success #stdin #stdout 0.38s 381952KB
stdin
Standard input is empty
stdout
scala.collection.immutable.$colon$colon