summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorGeoffrey Washburn <geoffrey.washburn@epfl.ch>2008-03-04 16:44:37 +0000
committerGeoffrey Washburn <geoffrey.washburn@epfl.ch>2008-03-04 16:44:37 +0000
commit9aacd6ddc4804b18498b8d1bdc702ef8682e731d (patch)
tree7a9bc22d0c2b6efcde01eb6bdb9e8b3e2d533f3d /src/compiler
parent7eadd5453dc26f2e39eee08ec823155680d51339 (diff)
downloadscala-9aacd6ddc4804b18498b8d1bdc702ef8682e731d.tar.gz
scala-9aacd6ddc4804b18498b8d1bdc702ef8682e731d.tar.bz2
scala-9aacd6ddc4804b18498b8d1bdc702ef8682e731d.zip
Added equals methods to instances of Ordered.
They are probably never used, but just in case.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/doc/ModelExtractor.scala3
-rw-r--r--src/compiler/scala/tools/nsc/doc/ModelToXML.scala4
2 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/ModelExtractor.scala b/src/compiler/scala/tools/nsc/doc/ModelExtractor.scala
index ad34bcbb3d..90d15557c7 100644
--- a/src/compiler/scala/tools/nsc/doc/ModelExtractor.scala
+++ b/src/compiler/scala/tools/nsc/doc/ModelExtractor.scala
@@ -438,6 +438,9 @@ trait ModelExtractor {
assert(diff0 != 0)
diff0
}
+ override def equals(other: Any) : Boolean =
+ eA.equals(other) || (other match { case that: AnyRef => this.eq(that)
+ case _ => false })
}})
set addAll entities;
set
diff --git a/src/compiler/scala/tools/nsc/doc/ModelToXML.scala b/src/compiler/scala/tools/nsc/doc/ModelToXML.scala
index 331ce62ad6..de41df11c6 100644
--- a/src/compiler/scala/tools/nsc/doc/ModelToXML.scala
+++ b/src/compiler/scala/tools/nsc/doc/ModelToXML.scala
@@ -217,6 +217,10 @@ trait ModelToXML extends ModelExtractor {
diff0
}
}
+ override def equals(other: Any): Boolean =
+ other match { case that: entity.Member => compare(that) == 0
+ case that: AnyRef => this.eq(that)
+ case _ => false }
});
set addAll xs;
seq = seq ++ <table cellpadding="3" class="member" summary="">