aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/neg/t1878.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/neg/t1878.scala')
-rw-r--r--tests/untried/neg/t1878.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/untried/neg/t1878.scala b/tests/untried/neg/t1878.scala
new file mode 100644
index 000000000..b29186afc
--- /dev/null
+++ b/tests/untried/neg/t1878.scala
@@ -0,0 +1,17 @@
+object Test extends App {
+ // 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))
+
+ /* see t1878-typer.scala
+ // illegal - bug #1764
+ null match {
+ case <p> { _* } </p> =>
+ }
+ */
+}