summaryrefslogtreecommitdiff
path: root/test/files/pos/patterns.scala
diff options
context:
space:
mode:
authorBurak Emir <emir@epfl.ch>2007-03-22 03:28:30 +0000
committerBurak Emir <emir@epfl.ch>2007-03-22 03:28:30 +0000
commitc61121a813abaace6e739a6f02e4c85b186f95a1 (patch)
tree74e4b0b57269397e888424346f674efcd933efc4 /test/files/pos/patterns.scala
parent8e890c848ff68e69342d0f340df40f926857c861 (diff)
downloadscala-c61121a813abaace6e739a6f02e4c85b186f95a1.tar.gz
scala-c61121a813abaace6e739a6f02e4c85b186f95a1.tar.bz2
scala-c61121a813abaace6e739a6f02e4c85b186f95a1.zip
new pattern matching algo
removed "removeoption" changed SUnit and some tests added useful debug msg in typer
Diffstat (limited to 'test/files/pos/patterns.scala')
-rw-r--r--test/files/pos/patterns.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/pos/patterns.scala b/test/files/pos/patterns.scala
index 85d8a1b7da..547d692d87 100644
--- a/test/files/pos/patterns.scala
+++ b/test/files/pos/patterns.scala
@@ -27,3 +27,12 @@ object test {
case None => println("nothing")
}
}
+
+// if bodies are duplicated, then we would get an error like "double definition"
+
+trait John[A,B] {
+ def filter(x:Any) = x match {
+ case (x::xs, _) => "ga"
+ case _ => {x:String => "foobar"}
+ }
+}