summaryrefslogtreecommitdiff
path: root/src/library/scala/Function.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-03-01 16:37:01 +0000
committerPaul Phillips <paulp@improving.org>2010-03-01 16:37:01 +0000
commit60ae43e753f0f48e245a46767dea597ec4b6db4e (patch)
tree88096586506f7676a1ac66b61498d6a6925558d5 /src/library/scala/Function.scala
parentc8e224eaec949ed86c916855ae8f3ce03f54898b (diff)
downloadscala-60ae43e753f0f48e245a46767dea597ec4b6db4e.tar.gz
scala-60ae43e753f0f48e245a46767dea597ec4b6db4e.tar.bz2
scala-60ae43e753f0f48e245a46767dea597ec4b6db4e.zip
Undeprecated Function.tupled based on the type ...
Undeprecated Function.tupled based on the type inference issues documented at: http://stackoverflow.com/questions/2354277/function-tupled-and-placehold er-syntax We should revisit if anon function inference improves. Review by community.
Diffstat (limited to 'src/library/scala/Function.scala')
-rw-r--r--src/library/scala/Function.scala11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/library/scala/Function.scala b/src/library/scala/Function.scala
index 0409d938fd..6ef137aa2b 100644
--- a/src/library/scala/Function.scala
+++ b/src/library/scala/Function.scala
@@ -93,10 +93,13 @@ object Function
/** Tupling for functions of arity 2. This transforms a function
* of arity 2 into a unary function that takes a pair of arguments.
*
+ * @note These functions are slotted for deprecation, but it is on
+ * hold pending superior type inference for tupling anonymous functions.
+ *
* @param f ...
* @return ...
*/
- @deprecated("Use `f.tupled` instead")
+ // @deprecated("Use `f.tupled` instead")
def tupled[a1, a2, b](f: (a1, a2) => b): Tuple2[a1, a2] => b = {
case Tuple2(x1, x2) => f(x1, x2)
}
@@ -104,7 +107,7 @@ object Function
/** Tupling for functions of arity 3. This transforms a function
* of arity 3 into a unary function that takes a triple of arguments.
*/
- @deprecated("Use `f.tupled` instead")
+ // @deprecated("Use `f.tupled` instead")
def tupled[a1, a2, a3, b](f: (a1, a2, a3) => b): Tuple3[a1, a2, a3] => b = {
case Tuple3(x1, x2, x3) => f(x1, x2, x3)
}
@@ -112,7 +115,7 @@ object Function
/** Tupling for functions of arity 4. This transforms a function
* of arity 4 into a unary function that takes a 4-tuple of arguments.
*/
- @deprecated("Use `f.tupled` instead")
+ // @deprecated("Use `f.tupled` instead")
def tupled[a1, a2, a3, a4, b](f: (a1, a2, a3, a4) => b): Tuple4[a1, a2, a3, a4] => b = {
case Tuple4(x1, x2, x3, x4) => f(x1, x2, x3, x4)
}
@@ -120,7 +123,7 @@ object Function
/** Tupling for functions of arity 5. This transforms a function
* of arity 5 into a unary function that takes a 5-tuple of arguments.
*/
- @deprecated("Use `f.tupled` instead")
+ // @deprecated("Use `f.tupled` instead")
def tupled[a1, a2, a3, a4, a5, b](f: (a1, a2, a3, a4, a5) => b): Tuple5[a1, a2, a3, a4, a5] => b = {
case Tuple5(x1, x2, x3, x4, x5) => f(x1, x2, x3, x4, x5)
}