summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2007-05-20 16:05:38 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2007-05-20 16:05:38 +0000
commita43e6b1242018f538a25efd70e74ab87abc8691d (patch)
tree1e374930c79cfc2d2738609b09c7dd8b41bec971 /src/library
parentd8e55969506c6db2ac21948128404ddf938d4b8c (diff)
downloadscala-a43e6b1242018f538a25efd70e74ab87abc8691d.tar.gz
scala-a43e6b1242018f538a25efd70e74ab87abc8691d.tar.bz2
scala-a43e6b1242018f538a25efd70e74ab87abc8691d.zip
Rich comparison (scala.runtime.Comparator.equal...
Rich comparison (scala.runtime.Comparator.equals) is not inserted when both sides of an equality are statically known to be equal and of a subtype of Number or Character. This is an optimisation — behaviour should be equivalent as their own equal methods should do ok.
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/runtime/Comparator.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library/scala/runtime/Comparator.java b/src/library/scala/runtime/Comparator.java
index c73c7506ba..705bf30d5c 100644
--- a/src/library/scala/runtime/Comparator.java
+++ b/src/library/scala/runtime/Comparator.java
@@ -36,8 +36,8 @@ public class Comparator {
* ICode phase, method <code>genEqEqPrimitive</code>) only when either
* side of the comparison is a subclass of <code>AnyVal</code>, of
* <code>java.lang.Number</code>, of <code>java.lang.Character</code> or
- * is exactly <code>Any</code> or <code>AnyRef</code>.
- */
+ * is exactly <code>Any</code> or <code>AnyRef</code>, but when both sides
+ * have different types. */
public static boolean equals(Object a, Object b) {
if (a == null)
return b == null;