File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -6888,7 +6888,7 @@ reduces them without incurring seq initialization"
6888
6888
(aset new-arr (inc len) val)
6889
6889
(set! (.-val added-leaf?) true )
6890
6890
(HashCollisionNode. nil collision-hash (inc cnt) new-arr))
6891
- (if (= (aget arr idx) val)
6891
+ (if (= (aget arr ( inc idx) ) val)
6892
6892
inode
6893
6893
(HashCollisionNode. nil collision-hash cnt (clone-and-set arr (inc idx) val)))))
6894
6894
(.inode-assoc (BitmapIndexedNode. nil (bitpos collision-hash shift) (array nil inode))
Original file line number Diff line number Diff line change 29
29
(-> (hash-map :a 1 :b 2 :c 3 :d 4 nil 5 )
30
30
(-iterator )
31
31
(iter->set )))))
32
+
33
+ (deftest test-cljs-1817
34
+ (let [cljscore-hash hash]
35
+ (with-redefs [hash (fn [x]
36
+ (if (or (#{:a :b } x) 0 )
37
+ cljscore-hash))]
38
+ (let [x (hash-map :a :a :b -1 )]
39
+ (is (= (assoc x :b :b ) {:a :a :b :b }))))))
You can’t perform that action at this time.
0 commit comments