diff options
author | Paul Phillips <paulp@improving.org> | 2012-03-30 20:54:05 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-03-30 20:54:05 -0700 |
commit | 03aca2c5bc293f8fd79e99b2aaac79cdc043c1da (patch) | |
tree | ea832b582e355f1a6687b286266b59b8108188c6 /test/files/run/lift-and-unlift.scala | |
parent | dc8b431f1c38ff805d660c44b19ee5ecc91bddb2 (diff) | |
parent | 1890a4175dc6c436b37ddc8c6b74e036b9c6328c (diff) | |
download | scala-03aca2c5bc293f8fd79e99b2aaac79cdc043c1da.tar.gz scala-03aca2c5bc293f8fd79e99b2aaac79cdc043c1da.tar.bz2 scala-03aca2c5bc293f8fd79e99b2aaac79cdc043c1da.zip |
Merge remote-tracking branch 'adriaanm/topic/partialfun' into develop
Diffstat (limited to 'test/files/run/lift-and-unlift.scala')
-rw-r--r-- | test/files/run/lift-and-unlift.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/files/run/lift-and-unlift.scala b/test/files/run/lift-and-unlift.scala index b944c70155..a4a5d9502e 100644 --- a/test/files/run/lift-and-unlift.scala +++ b/test/files/run/lift-and-unlift.scala @@ -2,7 +2,7 @@ import Function.unlift object Test { def evens1(x: Int) = if (x % 2 == 0) Some(x) else None - def evens2: PartialFunction[Int, Int] = { + val evens2: PartialFunction[Int, Int] = { case x if x % 2 == 0 => x } @@ -21,7 +21,7 @@ object Test { }) assert(f1 eq f3.lift) - // Hmm, why is this not true: - // assert(f2 eq f4.lift) + assert(f4 eq unlift(f2)) + assert(f4 eq evens2) } } |