diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-11-22 03:12:36 -0800 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-11-22 03:12:36 -0800 |
commit | 666f39d3493ee633a616c40f1c41add1190a3a40 (patch) | |
tree | a62015e39bfdd6235bdcf0bef31fc31342ea60b6 /src/library | |
parent | 42657a6918ef7d6fd3f36838739ec8a3b64744a3 (diff) | |
parent | b004c3ddb38f8e690a0895a51ad0c83ff57a01e7 (diff) | |
download | scala-666f39d3493ee633a616c40f1c41add1190a3a40.tar.gz scala-666f39d3493ee633a616c40f1c41add1190a3a40.tar.bz2 scala-666f39d3493ee633a616c40f1c41add1190a3a40.zip |
Merge pull request #3131 from densh/pr/deprecate-pair-and-triple
Deprecate Pair and Triple
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/Predef.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/library/scala/Predef.scala b/src/library/scala/Predef.scala index cd96b5182c..8900450fa3 100644 --- a/src/library/scala/Predef.scala +++ b/src/library/scala/Predef.scala @@ -26,8 +26,6 @@ import scala.io.ReadStdin * [[scala.collection.immutable.Set]], and the [[scala.collection.immutable.List]] * constructors ([[scala.collection.immutable.::]] and * [[scala.collection.immutable.Nil]]). - * The types `Pair` (a [[scala.Tuple2]]) and `Triple` (a [[scala.Tuple3]]), with - * simple constructors, are also provided. * * === Console I/O === * Predef provides a number of simple functions for console I/O, such as @@ -230,13 +228,17 @@ object Predef extends LowPriorityImplicits with DeprecatedPredef { // tupling ------------------------------------------------------------ + @deprecated("Use built-in tuple syntax or Tuple2 instead", "2.11.0") type Pair[+A, +B] = Tuple2[A, B] + @deprecated("Use built-in tuple syntax or Tuple2 instead", "2.11.0") object Pair { def apply[A, B](x: A, y: B) = Tuple2(x, y) def unapply[A, B](x: Tuple2[A, B]): Option[Tuple2[A, B]] = Some(x) } + @deprecated("Use built-in tuple syntax or Tuple3 instead", "2.11.0") type Triple[+A, +B, +C] = Tuple3[A, B, C] + @deprecated("Use built-in tuple syntax or Tuple3 instead", "2.11.0") object Triple { def apply[A, B, C](x: A, y: B, z: C) = Tuple3(x, y, z) def unapply[A, B, C](x: Tuple3[A, B, C]): Option[Tuple3[A, B, C]] = Some(x) |