From 6802b7f4204e236775f0e7ab6985869f26775d94 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 11 Jul 2003 13:17:44 +0000 Subject: *** empty log message *** --- test/files/pos/sort1.scala | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/files/pos') diff --git a/test/files/pos/sort1.scala b/test/files/pos/sort1.scala index c2895fe535..a6eb6a7618 100644 --- a/test/files/pos/sort1.scala +++ b/test/files/pos/sort1.scala @@ -2,8 +2,8 @@ object test { type String = java.lang.String; - def while(def c: Boolean)(def b: Unit): Unit = - if (c) { b ; while(c)(b) } + def While(def c: Boolean)(def b: Unit): Unit = + if (c) { b ; While(c)(b) } else (); def sort(a: Array[Double]): Unit = { @@ -15,9 +15,9 @@ object test { def sort1(l: Int, r: Int): Unit = { val pivot = a((l + r) / 2); var i = l, j = r; - while (i <= j) { - while (a(i) < pivot) { i = i + 1 } - while (a(j) > pivot) { j = j - 1 } + While (i <= j) { + While (a(i) < pivot) { i = i + 1 } + While (a(j) > pivot) { j = j - 1 } if (i <= j) { swap(i, j); i = i + 1; @@ -30,4 +30,4 @@ object test { sort1(0, a.length - 1); } -} \ No newline at end of file +} -- cgit v1.2.3