diff options
author | Martin Odersky <odersky@gmail.com> | 2003-07-11 13:17:44 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2003-07-11 13:17:44 +0000 |
commit | 6802b7f4204e236775f0e7ab6985869f26775d94 (patch) | |
tree | 7c4471f192dc15bd25e253030d317580cd2c3e9d | |
parent | ca9f4fbb7b1212cfcde866ee95957afc6d157943 (diff) | |
download | scala-6802b7f4204e236775f0e7ab6985869f26775d94.tar.gz scala-6802b7f4204e236775f0e7ab6985869f26775d94.tar.bz2 scala-6802b7f4204e236775f0e7ab6985869f26775d94.zip |
*** empty log message ***
-rw-r--r-- | test/files/pos/sort1.scala | 12 | ||||
-rw-r--r-- | test/pos/sort1.scala | 12 |
2 files changed, 12 insertions, 12 deletions
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 +} diff --git a/test/pos/sort1.scala b/test/pos/sort1.scala index c2895fe535..a6eb6a7618 100644 --- a/test/pos/sort1.scala +++ b/test/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 +} |