diff options
author | Paul Phillips <paulp@improving.org> | 2011-02-20 06:51:57 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-02-20 06:51:57 +0000 |
commit | fd1ca1e63c876046936f681be26730a301da8ff2 (patch) | |
tree | 6db9fac72b958af0df8c51eeae8478c0fe5b6a98 /test/files/run | |
parent | 6a570deed1790889f7036a00c045c15217313587 (diff) | |
download | scala-fd1ca1e63c876046936f681be26730a301da8ff2.tar.gz scala-fd1ca1e63c876046936f681be26730a301da8ff2.tar.bz2 scala-fd1ca1e63c876046936f681be26730a301da8ff2.zip |
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.
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/lift-and-unlift.scala | 6 |
1 files changed, 4 insertions, 2 deletions
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) |