summaryrefslogtreecommitdiff
path: root/test/files/run/patmatnew.scala
diff options
context:
space:
mode:
authorBurak Emir <emir@epfl.ch>2007-06-21 11:11:15 +0000
committerBurak Emir <emir@epfl.ch>2007-06-21 11:11:15 +0000
commit72c1d53647bc4e6899cf21b8e7ea12ca252b31dd (patch)
tree8ff59c4c0fcb890474ac0caa4053d671dce7675c /test/files/run/patmatnew.scala
parent08fc901f4c6eb5973478ba12644e85d3e67bbee5 (diff)
downloadscala-72c1d53647bc4e6899cf21b8e7ea12ca252b31dd.tar.gz
scala-72c1d53647bc4e6899cf21b8e7ea12ca252b31dd.tar.bz2
scala-72c1d53647bc4e6899cf21b8e7ea12ca252b31dd.zip
fixed alternative detection, handling of variab...
fixed alternative detection, handling of variables for unapply patterns
Diffstat (limited to 'test/files/run/patmatnew.scala')
-rw-r--r--test/files/run/patmatnew.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/files/run/patmatnew.scala b/test/files/run/patmatnew.scala
index 0437598c40..6a5e725f29 100644
--- a/test/files/run/patmatnew.scala
+++ b/test/files/run/patmatnew.scala
@@ -19,6 +19,7 @@ object Test extends TestConsoleMain {
def suite = new TestSuite(
new TestSimpleIntSwitch,
+ new SimpleUnapply,
new Test717,
new TestGuards,
new TestStream,
@@ -30,6 +31,13 @@ object Test extends TestConsoleMain {
class Foo(j:Int) {
case class Bar(i:Int)
}
+ class SimpleUnapply extends TestCase("simpleUnapply") {
+ override def runTest() { // from sortedmap, old version
+ List((1,2)).head match {
+ case kv @ Pair(key, _) => kv.toString + " " + key.toString
+ }
+ }
+ }
class TestSimpleIntSwitch extends TestCase("SimpleIntSwitch") {
override def runTest() = {
assertEquals("s1", 1, 1 match {