diff options
author | Martin Odersky <odersky@gmail.com> | 2007-02-13 22:06:58 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2007-02-13 22:06:58 +0000 |
commit | e5b3a8a6b49dd4ab333781e3e7ce595ba14b06eb (patch) | |
tree | eada70e866264f0c52735024ce7a5804bb9f7bb8 /test/files/run | |
parent | bd426ab6f97ad86266ea1f044f9945d76024eeac (diff) | |
download | scala-e5b3a8a6b49dd4ab333781e3e7ce595ba14b06eb.tar.gz scala-e5b3a8a6b49dd4ab333781e3e7ce595ba14b06eb.tar.bz2 scala-e5b3a8a6b49dd4ab333781e3e7ce595ba14b06eb.zip |
changed tuple syntax to (...)
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/patmatnew.scala | 12 | ||||
-rw-r--r-- | test/files/run/tuples.scala | 6 |
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") } } |