From fd1ca1e63c876046936f681be26730a301da8ff2 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sun, 20 Feb 2011 06:51:57 +0000 Subject: Moved unlift to the Function companion object, ... Moved unlift to the Function companion object, which might have been better in the first place. Had to make a minor change to genprod, and then I couldn't escape that unscathed. Finished the not very complete undertaking I found there to update the scaladoc. Lots of little changes to the generated text and code. I changed genprod to only put a unique stamp on Function0 so we can stop having a 100 file diff everytime an i is dotted somewhere. Closes #3825, no review. --- test/files/run/lift-and-unlift.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/files/run/lift-and-unlift.scala') diff --git a/test/files/run/lift-and-unlift.scala b/test/files/run/lift-and-unlift.scala index 859ec02f99..5a59f63ae4 100644 --- a/test/files/run/lift-and-unlift.scala +++ b/test/files/run/lift-and-unlift.scala @@ -1,3 +1,5 @@ +import Function.unlift + object Test { def evens1(x: Int) = if (x % 2 == 0) Some(x) else None def evens2: PartialFunction[Int, Int] = { @@ -10,8 +12,8 @@ object Test { assert(1 to 10 forall (x => f1(x) == f2(x))) - val f3 = f1.unlift - val f4 = f2.unlift + val f3 = unlift(f1) + val f4 = unlift(f2) assert(1 to 10 forall { x => if (!f3.isDefinedAt(x)) !f4.isDefinedAt(x) -- cgit v1.2.3