From 016d815104b1d44b2b899c68804dde500963fbcd Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Wed, 12 May 2010 21:17:29 +0000 Subject: Overhauled sequence length logic in the pattern... Overhauled sequence length logic in the pattern matcher. Removes unnecessary boxing and a few varieties of wrongness. Closes #3395, #3150, #2958, #2945, #2187. No review. --- test/files/run/bug2958.scala | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/files/run/bug2958.scala (limited to 'test/files/run/bug2958.scala') diff --git a/test/files/run/bug2958.scala b/test/files/run/bug2958.scala new file mode 100644 index 0000000000..dcd24ecc36 --- /dev/null +++ b/test/files/run/bug2958.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 -- cgit v1.2.3