diff options
author | Martin Odersky <odersky@gmail.com> | 2006-06-21 10:36:06 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2006-06-21 10:36:06 +0000 |
commit | 2933e3f3cce9221a1fbe76b434957f8affb54548 (patch) | |
tree | afce1c862f9f24d3d456a31edd1c1b0c59b7663b /test/files/run | |
parent | b444420b5b136e8f6e3439c100fbcc5236e0100b (diff) | |
download | scala-2933e3f3cce9221a1fbe76b434957f8affb54548.tar.gz scala-2933e3f3cce9221a1fbe76b434957f8affb54548.tar.bz2 scala-2933e3f3cce9221a1fbe76b434957f8affb54548.zip |
Fixed test files after syntax change for closures.
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/Course-2002-05.scala | 6 | ||||
-rw-r--r-- | test/files/run/Course-2002-10.scala | 6 | ||||
-rw-r--r-- | test/files/run/bug216.scala | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/test/files/run/Course-2002-05.scala b/test/files/run/Course-2002-05.scala index c761f88f5d..abf9978ac6 100644 --- a/test/files/run/Course-2002-05.scala +++ b/test/files/run/Course-2002-05.scala @@ -21,7 +21,7 @@ object M0 { xs else { val pivot = xs.head; - val sub = partition(xs.tail, (elem : a => less(elem, pivot))); + val sub = partition(xs.tail, { elem : a => less(elem, pivot) }); quicksort(less)(sub._1) ::: List(pivot) ::: quicksort(less)(sub._2) } } @@ -61,7 +61,7 @@ object M1 { xs else { val pivot = xs.head; - val sub = partition(xs.tail, (elem : a => less(elem, pivot))); + val sub = partition(xs.tail, (elem : a) => less(elem, pivot)); quicksort(less)(sub._1) ::: List(pivot) ::: quicksort(less)(sub._2) } } @@ -97,7 +97,7 @@ object M2 { else { val x = s.head; val withoutX = powerset(s.tail); - withoutX ::: withoutX.map(s1 : List[a] => x::s1) + withoutX ::: withoutX.map { s1 : List[a] => x::s1 } } } diff --git a/test/files/run/Course-2002-10.scala b/test/files/run/Course-2002-10.scala index e634309018..d92893772e 100644 --- a/test/files/run/Course-2002-10.scala +++ b/test/files/run/Course-2002-10.scala @@ -25,7 +25,7 @@ object M0 { object M1 { def scale(x: double, s: Stream[double]): Stream[double] = - s map (e: double => e*x); + s map { e: double => e*x } def partialSums(s: Stream[double]): Stream[double] = Stream.cons(s.head, partialSums(s.tail) map (x => x + s.head)); @@ -46,14 +46,14 @@ object M1 { better(s, transform) map (x => x.head); def lnSummands(n: double): Stream[double] = - Stream.cons(1.0 / n, lnSummands(n + 1.0) map (x: double => -x)); + Stream.cons(1.0 / n, lnSummands(n + 1.0) map { x: double => -x }) var ln0 = partialSums(lnSummands(1.0)); var ln1 = euler(ln0); var ln2 = veryGood(ln0, euler); def piSummands(n: double): Stream[double] = - Stream.cons(1.0 / n, piSummands(n + 2.0) map (x: double => -x)); + Stream.cons(1.0 / n, piSummands(n + 2.0) map { x: double => -x }) var pi0 = scale(4.0, partialSums(piSummands(1.0))); var pi1 = euler(pi0); diff --git a/test/files/run/bug216.scala b/test/files/run/bug216.scala index 41b2af7b50..8f67c7b024 100644 --- a/test/files/run/bug216.scala +++ b/test/files/run/bug216.scala @@ -1,6 +1,6 @@ object Test extends Application { object m { - val f = x: unit => (); + val f = { x: unit => () } Console.println("OK") } m; |