Details
-
Type:
Defect
-
Status:
Closed
-
Priority:
Major
-
Resolution: Completed
-
Affects Version/s: Release 1.4
-
Fix Version/s: Release 1.5
-
Component/s: None
-
Labels:None
-
Patch:Code and Test
-
Approval:Ok
Description
There are two issues:
1) PersistentQueue's hash function doesn't match its equiv function:
(def iq (conj clojure.lang.PersistentQueue/EMPTY (Integer. -1)))
(def lq (conj clojure.lang.PersistentQueue/EMPTY (Long. -1)))
[(= iq lq) (= (hash iq) (hash lq))]
;=> [true false]
2) PersistentQueue's hash function doesn't match PersistentVector's hash:
(def q (conj clojure.lang.PersistentQueue/EMPTY 1 2 3))
[(= [1 2 3] q) (= (hash [1 2 3]) (hash q))]
;=> [true false]
Clojure-dev discussion: https://groups.google.com/d/topic/clojure-dev/ME3-Ke-RbNk/discussion