summaryrefslogtreecommitdiff
path: root/test/files/run/patmatnew.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/patmatnew.scala')
-rw-r--r--test/files/run/patmatnew.scala12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/files/run/patmatnew.scala b/test/files/run/patmatnew.scala
index 9dc73a86de..e77e10abeb 100644
--- a/test/files/run/patmatnew.scala
+++ b/test/files/run/patmatnew.scala
@@ -100,9 +100,9 @@ object Test {
// these are exhaustive matches
// should not generate any warnings
def f[A](z:{Option[A],Option[A]}) = z match {
- case {None,Some(x)} => 1
- case {Some(x),None } => 2
- case {Some(x),Some(y)} => 3
+ case Pair(None,Some(x)) => 1
+ case Pair(Some(x),None ) => 2
+ case Pair(Some(x),Some(y)) => 3
case _ => 4
}
@@ -119,9 +119,9 @@ object Test {
}
def h[A](x:{Option[A],Option[A]}) = x match {
- case {None,_:Some[_]} => 1
- case {_:Some[_],None } => 2
- case {_:Some[_],_:Some[_]} => 3
+ case Pair(None,_:Some[_]) => 1
+ case Pair(_:Some[_],None ) => 2
+ case Pair(_:Some[_],_:Some[_]) => 3
case _ => 4
}