Skip to content

Commit b35d693

Browse files
thhellerdnolen
authored andcommitted
CLJS-1994: assoc on nil returns PHM (expected PAM)
1 parent 296d0a6 commit b35d693

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/cljs/cljs/core.cljs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1865,7 +1865,7 @@ reduces them without incurring seq initialization"
18651865
:else not-found)
18661866
not-found)))
18671867

1868-
(declare PersistentHashMap)
1868+
(declare PersistentHashMap PersistentArrayMap)
18691869

18701870
(defn assoc
18711871
"assoc[iate]. When applied to a map, returns a new map of the
@@ -1875,7 +1875,7 @@ reduces them without incurring seq initialization"
18751875
([coll k v]
18761876
(if-not (nil? coll)
18771877
(-assoc coll k v)
1878-
(hash-map k v)))
1878+
(array-map k v)))
18791879
([coll k v & kvs]
18801880
(let [ret (assoc coll k v)]
18811881
(if kvs

0 commit comments

Comments
 (0)