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/pos/bug2945.scala | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/files/pos/bug2945.scala (limited to 'test/files/pos/bug2945.scala') 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 -- cgit v1.2.3