summaryrefslogtreecommitdiff
path: root/src/library/scala/Predef.scala
diff options
context:
space:
mode:
authorDen Shabalin <den.shabalin@gmail.com>2013-11-13 15:33:33 +0100
committerDen Shabalin <den.shabalin@gmail.com>2013-11-20 16:06:30 +0100
commitb004c3ddb38f8e690a0895a51ad0c83ff57a01e7 (patch)
tree0c31f83d2e039db4c2ead7a3280aaabc78671333 /src/library/scala/Predef.scala
parentc243435f113615b2f7407fbd683c93ec16c73749 (diff)
downloadscala-b004c3ddb38f8e690a0895a51ad0c83ff57a01e7.tar.gz
scala-b004c3ddb38f8e690a0895a51ad0c83ff57a01e7.tar.bz2
scala-b004c3ddb38f8e690a0895a51ad0c83ff57a01e7.zip
deprecate Pair and Triple
Diffstat (limited to 'src/library/scala/Predef.scala')
-rw-r--r--src/library/scala/Predef.scala6
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)