| | 1 | object Test { |
| | 2 | def f1 = ("": Any) match { case List(x @ _*) => x ; case _ => false } |
| | 3 | def f2 = (5: Any) match { case List(x @ _*) => x ; case _ => false } |
| | 4 | def f3 = (Nil: Any) match { case List(x @ _*) => x ; case _ => false } |
| | 5 | def f4 = (Array(1): Any) match { case List(x @ _*) => x ; case _ => false } |
| | 6 | |
| | 7 | def f5 = ("": Any) match { case Array(x @ _*) => x ; case _ => false } |
| | 8 | def f6 = (5: Any) match { case Array(x @ _*) => x ; case _ => false } |
| | 9 | def f7 = (Nil: Any) match { case Array(x @ _*) => x ; case _ => false } |
| | 10 | def f8 = (Array(1): Any) match { case Array(x @ _*) => x ; case _ => false } |
| | 11 | |
| | 12 | def f9 = ("": Any) match { case x @ List(_*) => x ; case _ => false } |
| | 13 | def f10 = ("": Any) match { case List(_*) => true ; case _ => false } |
| | 14 | def f11 = (Nil: Any) match { case List(_*) => true ; case _ => false } |
| | 15 | def f12 = ("": Any) match { case x @ Array(_*) => x ; case _ => false } |
| | 16 | def f13 = ("": Any) match { case Array(_*) => true ; case _ => false } |
| | 17 | def f14 = (Nil: Any) match { case Array(_*) => true ; case _ => false } |
| | 18 | |
| | 19 | |
| | 20 | def main(args: Array[String]): Unit = { |
| | 21 | println(f1) |
| | 22 | println(f2) |
| | 23 | println(f3) |
| | 24 | println(f4) |
| | 25 | println(f5) |
| | 26 | println(f6) |
| | 27 | println(f7) |
| | 28 | println(f8) |
| | 29 | println(f9) |
| | 30 | println(f10) |
| | 31 | println(f11) |
| | 32 | println(f12) |
| | 33 | println(f13) |
| | 34 | println(f14) |
| | 35 | } |
| | 36 | } |