summaryrefslogtreecommitdiff
path: root/test/files/run/regularpatmat.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/regularpatmat.scala')
-rw-r--r--test/files/run/regularpatmat.scala13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/files/run/regularpatmat.scala b/test/files/run/regularpatmat.scala
index 6e964b8f13..91cb2be12b 100644
--- a/test/files/run/regularpatmat.scala
+++ b/test/files/run/regularpatmat.scala
@@ -605,8 +605,17 @@ object testMZ {
case _ => "default";
}
+ def mat(xs: List[Any]) = xs match { // bug#196
+ case List(b@(()|())) =>
+ "case, b = " + b;
+
+ case _ =>"default";
+
+ }
+
+
def main:Unit = {
- System.out.println("testMZ - bugs #132 #133b #180");
+ System.out.println("testMZ - bugs #132 #133b #180 #196");
test[List[Expr],String](testFoo, List(Two(),Two(),Two(),Two()), "b = Two");
test[List[Expr],String](testFoo, List(Two(),Two(),Two()), "a = Two");
test[List[Expr],String](testFoo, List(Two(),Two()), "a = Two");
@@ -619,6 +628,8 @@ object testMZ {
test[List[Any],String](testBar, List(On(), On(), On()), "case");
test[List[Any],String](testBar, List(On(), On(), On(), On()), "default");
test[List[Any],String](testBar, List(On(), On(), On(), On(), On()), "default");
+ test[List[Any], String](mat, List(1), "default");
+ test[List[Any], String](mat, List(), "case, b = List()");
()
}