summaryrefslogtreecommitdiff
path: root/test/files/run/t2958.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t2958.scala')
-rw-r--r--test/files/run/t2958.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/t2958.scala b/test/files/run/t2958.scala
new file mode 100644
index 0000000000..dcd24ecc36
--- /dev/null
+++ b/test/files/run/t2958.scala
@@ -0,0 +1,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]) {
+ assert(f(Array("1", "2")) == "12")
+ }
+} \ No newline at end of file