diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
commit | b6778be91900b8161e705dc2598ef7af86842b0b (patch) | |
tree | d15e8ec18a37eec212f50f1ace27714d7e7d4d34 /test/files/run/lift-and-unlift.scala | |
parent | ac6c76f26d884a94d0c9ff54f055d3f9ab750bac (diff) | |
download | scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.gz scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.bz2 scala-b6778be91900b8161e705dc2598ef7af86842b0b.zip |
Begone t1737...
Diffstat (limited to 'test/files/run/lift-and-unlift.scala')
-rw-r--r-- | test/files/run/lift-and-unlift.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/files/run/lift-and-unlift.scala b/test/files/run/lift-and-unlift.scala index 5a59f63ae4..b944c70155 100644 --- a/test/files/run/lift-and-unlift.scala +++ b/test/files/run/lift-and-unlift.scala @@ -5,21 +5,21 @@ object Test { def evens2: PartialFunction[Int, Int] = { case x if x % 2 == 0 => x } - + def main(args: Array[String]): Unit = { val f1 = evens1 _ val f2 = evens2.lift - + assert(1 to 10 forall (x => f1(x) == f2(x))) - + val f3 = unlift(f1) val f4 = unlift(f2) - + assert(1 to 10 forall { x => if (!f3.isDefinedAt(x)) !f4.isDefinedAt(x) else f3(x) == f4(x) }) - + assert(f1 eq f3.lift) // Hmm, why is this not true: // assert(f2 eq f4.lift) |