We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents db1e848 + eefee10 commit d96b8ebCopy full SHA for d96b8eb
src/library/scala/runtime/Statics.java
@@ -103,12 +103,20 @@ public static int anyHash(Object x) {
103
if (x == null)
104
return 0;
105
106
+ if (x instanceof java.lang.Number) {
107
+ return anyHashNumber((java.lang.Number) x);
108
+ }
109
+
110
+ return x.hashCode();
111
112
113
+ private static int anyHashNumber(Number x) {
114
if (x instanceof java.lang.Long)
115
return longHash(((java.lang.Long)x).longValue());
-
116
117
if (x instanceof java.lang.Double)
118
return doubleHash(((java.lang.Double)x).doubleValue());
119
120
if (x instanceof java.lang.Float)
121
return floatHash(((java.lang.Float)x).floatValue());
122
0 commit comments