summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/patmatnew.scala12
-rw-r--r--test/files/run/tuples.scala6
2 files changed, 9 insertions, 9 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
}
diff --git a/test/files/run/tuples.scala b/test/files/run/tuples.scala
index c6dcda4af8..3d0dcf7ac0 100644
--- a/test/files/run/tuples.scala
+++ b/test/files/run/tuples.scala
@@ -1,8 +1,8 @@
object Test extends Application {
- var xyz: {int, String, boolean} = _
- xyz = { 1, "abc", true }
+ var xyz: Triple(int, String, boolean) = _
+ xyz = Triple(1, "abc", true)
Console.println(xyz)
xyz match {
- case { 1, "abc", true } => Console.println("OK")
+ case Triple(1, "abc", true) => Console.println("OK")
}
}