diff options
author | Burak Emir <emir@epfl.ch> | 2008-01-15 23:18:08 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2008-01-15 23:18:08 +0000 |
commit | 078b5982346c1295706d24c2404854b3837043a1 (patch) | |
tree | d7bca6bdd02a090664b941d34e3e5f5f600005d3 /test | |
parent | 5d32ba1ca5bd9a0393f9b77f7204b26683638e1a (diff) | |
download | scala-078b5982346c1295706d24c2404854b3837043a1.tar.gz scala-078b5982346c1295706d24c2404854b3837043a1.tar.bz2 scala-078b5982346c1295706d24c2404854b3837043a1.zip |
fixed t341
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/patmatnew.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/files/run/patmatnew.scala b/test/files/run/patmatnew.scala index 3580e561e8..77727060da 100644 --- a/test/files/run/patmatnew.scala +++ b/test/files/run/patmatnew.scala @@ -165,11 +165,16 @@ object Test extends TestConsoleMain { def doMatch(xs: List[String]): String = xs match { case List(_*) => "ok" } + def doMatch2(xs: List[String]): List[String] = xs match { + case List(_, rest @ _*) => rest.toList + } override def runTest() { val list1 = List() assertEquals(doMatch(list1), "ok") val list2 = List("1","2","3") assertEquals(doMatch(list2), "ok") + val list3 = List("1","2","3") + assertEquals(doMatch2(list3), List("2","3")) } } |