summaryrefslogtreecommitdiff
path: root/test/files/pos/bug2945.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-05-12 21:17:29 +0000
committerPaul Phillips <paulp@improving.org>2010-05-12 21:17:29 +0000
commit016d815104b1d44b2b899c68804dde500963fbcd (patch)
treee223ac275ad0321f9e5d51e847f30ab11e7a234f /test/files/pos/bug2945.scala
parent0ed53d4d686db74a54315cd5ccf79bda3690b036 (diff)
downloadscala-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/pos/bug2945.scala')
-rw-r--r--test/files/pos/bug2945.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/files/pos/bug2945.scala b/test/files/pos/bug2945.scala
new file mode 100644
index 0000000000..762bdb61e1
--- /dev/null
+++ b/test/files/pos/bug2945.scala
@@ -0,0 +1,12 @@
+object Foo {
+ def test(s: String) = {
+ (s: Seq[Char]) match {
+ case Seq('f', 'o', 'o', ' ', rest1 @ _*) =>
+ rest1
+ case Seq('b', 'a', 'r', ' ', ' ', rest2 @ _*) =>
+ rest2
+ case _ =>
+ s
+ }
+ }
+} \ No newline at end of file