diff options
Diffstat (limited to 'test/files/pos/patterns.scala')
-rw-r--r-- | test/files/pos/patterns.scala | 9 |
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"} + } +} |