aboutsummaryrefslogblamecommitdiff
path: root/tests/run/t2958.scala
blob: cf4867ab5b20ed6cf98565db8dea95855a329e65 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                           
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]): Unit = {
    assert(f(Array("1", "2")) == "12")
  }
}