From 60ae43e753f0f48e245a46767dea597ec4b6db4e Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 1 Mar 2010 16:37:01 +0000 Subject: 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. --- src/library/scala/Function.scala | 11 +++++++---- 1 file 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) } -- cgit v1.2.3