| [#330] | project: compiler | priority: low | category: bug | |
|---|---|---|---|---|
| submitter | assigned to | status | date submitted | |
| Burak | Martin | fixed | 2004-05-10 12:33:36.0 | |
| subject | view resolution too weak | |||
| code |
/** Address holds a path in Dewey notation
*/
case class Address( list:List[Int] ) with Ordered[Address] {
def compareTo [b >: Address <% Ordered[b]](y: b): int = y match {
case Address( otherList ) => list compareTo otherList;
case _ => -(y compareTo this)
}
}
|
|||
| what happened | |
|||
| what expected | No error.
Despite the bound of compareTo, shouldn't overloading resolution find out that Ordered[scala.List[a]] is intended? |
|||
| [back to overview] | ||||
| Martin edited on 2004-05-13 12:38:13.0 |