Skip to content

Commit fc8522e

Browse files
authored
CLJS-3242: trailing keys bug (#243)
1 parent e78c6cd commit fc8522e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/cljs/cljs/core.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7217,7 +7217,7 @@ reduces them without incurring seq initialization"
72177217
(let [kv (first extra-kvs)]
72187218
(aset ret i (-key kv))
72197219
(aset ret (inc i) (-val kv))
7220-
(recur (+2seed-cnt) (next extra-kvs)))
7220+
(recur (+2i) (next extra-kvs)))
72217221
ret))))
72227222

72237223
(set! (.-createAsIfByAssoc PersistentArrayMap)

src/test/cljs/cljs/core_test.cljs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2043,10 +2043,10 @@
20432043
(is (= [110] (reset-vals! c 0)))
20442044
(is (=0 @c)))))
20452045

2046-
#_(defntest-keys [& {:as opts, :keys [a b]}]
2046+
(defntest-keys [& {:as opts, :keys [a b]}]
20472047
[a b opts])
20482048

2049-
#_(deftesttest-cljs-3299-trailing-keys
2049+
(deftesttest-cljs-3299-trailing-keys
20502050
(testing"verify proper handling of trailing keys"
20512051
(is (= (test-keys:a1, :b2)
20522052
[12 {:a1, :b2}]))
@@ -2055,4 +2055,4 @@
20552055
(is (= (test-keys {:a1, :b2, :c3})
20562056
[12 {:a1, :b2, :c3}]))
20572057
(is (= (test-keys:d4 {:a1, :b2, :c3})
2058-
[1nil {:d4, :a1, :c3, nilnil}]))))
2058+
[12 {:d4, :a1, :b2, :c3}]))))

0 commit comments

Comments
 (0)
close