Skip to content
Browse files

make hasheq coherent with equiv for records

Signed-off-by: Rich Hickey <richhickey@gmail.com>
  • Loading branch information...
1 parent 9350593 commit 6fd7b77399a9dd8f7f3cf6cf30edf01ce1059b57 @cgrand cgrand committed with richhickey Nov 27, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/clj/clojure/core_deftype.clj
View
2 src/clj/clojure/core_deftype.clj
@@ -189,7 +189,7 @@ ditto for method impls defined with deftype, defrecord, and reify."))))
(eqhash [[i m]]
[(conj i 'clojure.lang.IHashEq)
(conj m
- `(hasheq [this#] (bit-xor ~type-hash (.hashCode this#)))
+ `(hasheq [this#] (bit-xor ~type-hash (clojure.lang.APersistentMap/mapHasheq this#)))
`(hashCode [this#] (clojure.lang.APersistentMap/mapHash this#))
`(equals [this# ~gs] (clojure.lang.APersistentMap/mapEquals this# ~gs)))])
(iobj [[i m]]

0 comments on commit 6fd7b77

Please sign in to comment.
Something went wrong with that request. Please try again.