summaryrefslogblamecommitdiff
path: root/test/files/run/t2958.scala
blob: dcd24ecc3677dc1af3ce9aaa61c81ad08677a68f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11



                                           
 





                           
 



                                      
object Test {
  def f(args: Array[String]) = args match {
    case Array("-p", prefix, from, to) =>
      prefix + from + to

    case Array(from, to) =>
      from + to

    case _ =>
      "default"
  }

  def main(args: Array[String]) {
    assert(f(Array("1", "2")) == "12")
  }
}