summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/ast/TreeDSL.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-05-15 05:57:50 +0000
committerPaul Phillips <paulp@improving.org>2010-05-15 05:57:50 +0000
commitf4420e7b13542f771c3ca80abfeab4dabf16b309 (patch)
treed680eb76f3232dcecea64580c6b614f0a0583c2e /src/compiler/scala/tools/nsc/ast/TreeDSL.scala
parentd97b3a8066dfe588e080c6b3c87bda2c9f27f80e (diff)
downloadscala-f4420e7b13542f771c3ca80abfeab4dabf16b309.tar.gz
scala-f4420e7b13542f771c3ca80abfeab4dabf16b309.tar.bz2
scala-f4420e7b13542f771c3ca80abfeab4dabf16b309.zip
Swapped the order of the arguments to returning...
Swapped the order of the arguments to returning to make it consistent with the way I've been using it for a long time. No review, how about a question for nobody in particular instead: can we put this in the library somewhere so I can stop looking around for it everywhere I go? It's really handy. def returning[T](x: T)(f: T => Unit): T = { f(x) ; x }
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/TreeDSL.scala')
-rw-r--r--src/compiler/scala/tools/nsc/ast/TreeDSL.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/TreeDSL.scala b/src/compiler/scala/tools/nsc/ast/TreeDSL.scala
index 9aa36de703..38240316bb 100644
--- a/src/compiler/scala/tools/nsc/ast/TreeDSL.scala
+++ b/src/compiler/scala/tools/nsc/ast/TreeDSL.scala
@@ -26,7 +26,7 @@ trait TreeDSL {
tree => IF (tree MEMBER_== NULL) THEN ifNull ELSE f(tree)
// Applies a function to a value and then returns the value.
- def returning[T](f: T => Unit)(x: T): T = { f(x) ; x }
+ def returning[T](x: T)(f: T => Unit): T = { f(x) ; x }
// strip bindings to find what lies beneath
final def unbind(x: Tree): Tree = x match {