summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorburaq <buraq@epfl.ch>2005-02-21 16:53:14 +0000
committerburaq <buraq@epfl.ch>2005-02-21 16:53:14 +0000
commit2655bd72e08e392b49e29d4c9ac1ac119954e45d (patch)
tree92ca8ce523c56b6d25cd3cad37c28bdbcf9cdcb8 /test/files
parentbd9b58dd62bc03e38f09a0f66fba82fbcb886da5 (diff)
downloadscala-2655bd72e08e392b49e29d4c9ac1ac119954e45d.tar.gz
scala-2655bd72e08e392b49e29d4c9ac1ac119954e45d.tar.bz2
scala-2655bd72e08e392b49e29d4c9ac1ac119954e45d.zip
new test cas
Diffstat (limited to 'test/files')
-rw-r--r--test/files/run/regularpatmat.check2
-rw-r--r--test/files/run/regularpatmat.scala5
2 files changed, 7 insertions, 0 deletions
diff --git a/test/files/run/regularpatmat.check b/test/files/run/regularpatmat.check
index cc902ea473..a09b0ea562 100644
--- a/test/files/run/regularpatmat.check
+++ b/test/files/run/regularpatmat.check
@@ -118,3 +118,5 @@ passed ok
passed ok
passed ok
passed ok
+passed ok
+
diff --git a/test/files/run/regularpatmat.scala b/test/files/run/regularpatmat.scala
index 394b1931eb..6e4c30a5c8 100644
--- a/test/files/run/regularpatmat.scala
+++ b/test/files/run/regularpatmat.scala
@@ -652,6 +652,10 @@ object testMZ {
}
+ def mat398(xs:List[Any]) = xs match { // bug#398
+ case List(1) => "one"
+ case x::xs => "two"
+ }
def main:Unit = {
Console.println("testMZ - bugs #132 #133b #180 #195 #196");
@@ -672,6 +676,7 @@ object testMZ {
assertEquals(mat195( Two() ),"default");
assertEquals(mat196( List(1) ),"default");
assertEquals(mat196( List() ),"case, b = List()");
+ assertEquals(mat398( List() ),"two");
()
}