diff options
author | Paul Phillips <paulp@improving.org> | 2010-05-12 21:17:29 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-05-12 21:17:29 +0000 |
commit | 016d815104b1d44b2b899c68804dde500963fbcd (patch) | |
tree | e223ac275ad0321f9e5d51e847f30ab11e7a234f /test/files/run/bug2958.scala | |
parent | 0ed53d4d686db74a54315cd5ccf79bda3690b036 (diff) | |
download | scala-016d815104b1d44b2b899c68804dde500963fbcd.tar.gz scala-016d815104b1d44b2b899c68804dde500963fbcd.tar.bz2 scala-016d815104b1d44b2b899c68804dde500963fbcd.zip |
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.
Diffstat (limited to 'test/files/run/bug2958.scala')
-rw-r--r-- | test/files/run/bug2958.scala | 16 |
1 files changed, 16 insertions, 0 deletions
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 |