summaryrefslogtreecommitdiff
path: root/test/files/neg/bug1878.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-07-18 15:19:55 +0000
committerPaul Phillips <paulp@improving.org>2009-07-18 15:19:55 +0000
commit1c56489b3e008ffb192443a1627df16f245a6c01 (patch)
treeef14008ca66967f44c4eadaedb9f33c74d6a5b35 /test/files/neg/bug1878.scala
parent1f6c8f2be985dd24cb47dc1569d7980cf7a0fd2f (diff)
downloadscala-1c56489b3e008ffb192443a1627df16f245a6c01.tar.gz
scala-1c56489b3e008ffb192443a1627df16f245a6c01.tar.bz2
scala-1c56489b3e008ffb192443a1627df16f245a6c01.zip
Fix and post/neg test cases for #1878.
Diffstat (limited to 'test/files/neg/bug1878.scala')
-rw-r--r--test/files/neg/bug1878.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/files/neg/bug1878.scala b/test/files/neg/bug1878.scala
new file mode 100644
index 0000000000..ca76df082b
--- /dev/null
+++ b/test/files/neg/bug1878.scala
@@ -0,0 +1,10 @@
+object Test extends Application {
+ // illegal
+ val err1 = "" match { case Seq(f @ _*, ',') => f }
+
+ // no error
+ val List(List(arg1, _*), _) = List(List(1,2,3), List(4,5,6))
+
+ // illegal
+ val List(List(_*, arg2), _) = List(List(1,2,3), List(4,5,6))
+} \ No newline at end of file