diff options
author | Martin Odersky <odersky@gmail.com> | 2006-03-20 12:03:12 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2006-03-20 12:03:12 +0000 |
commit | 5459db1226b86027e0817acb0a2f41e0c12b28ed (patch) | |
tree | 2662cea2c40283eadcdccb5d53d58f769a825601 /test/files/pos | |
parent | 4ddf81c21818dadb435a4a43b91ae69688d8bc1d (diff) | |
download | scala-5459db1226b86027e0817acb0a2f41e0c12b28ed.tar.gz scala-5459db1226b86027e0817acb0a2f41e0c12b28ed.tar.bz2 scala-5459db1226b86027e0817acb0a2f41e0c12b28ed.zip |
1.
2. Changed method compareTo in class Ordered
to compare.
3. Moved retsynch to pending
4. Fixed bug 550
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/orderedpoints.scala | 6 | ||||
-rw-r--r-- | test/files/pos/viewtest3.scala | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/test/files/pos/orderedpoints.scala b/test/files/pos/orderedpoints.scala index 7e56a663fe..f972028bce 100644 --- a/test/files/pos/orderedpoints.scala +++ b/test/files/pos/orderedpoints.scala @@ -2,9 +2,9 @@ package test; class Point1(x: int) extends Object with Ordered[Point1] { val xCoord = x; - def compareTo [b >: Point1 <% Ordered[b]](that: b): int = that match { - case that1: Point1 => this.xCoord.compareTo(that1.xCoord) - case _ => -that.compareTo(this) + def compare [b >: Point1 <% Ordered[b]](that: b): int = that match { + case that1: Point1 => this.xCoord.compare(that1.xCoord) + case _ => -that.compare(this) } } class Point2(x: int, y: int) extends Point1(x) with Ordered[Point2] {} diff --git a/test/files/pos/viewtest3.scala b/test/files/pos/viewtest3.scala index 89e32e48a8..68277a7a47 100644 --- a/test/files/pos/viewtest3.scala +++ b/test/files/pos/viewtest3.scala @@ -20,9 +20,9 @@ class Node[a <% Ordered[a]](elem: a, l: Tree[a], r: Tree[a]) extends Tree[a] { } case class Str(elem: String) extends Ordered[Str] { - def compareTo[b >: Str <% Ordered[b]](that: b): int = that match { - case that1: Str => this.elem compareTo that1.elem - case _ => -(that compareTo this) + def compare[b >: Str <% Ordered[b]](that: b): int = that match { + case that1: Str => this.elem compare that1.elem + case _ => -(that compare this) } } |