Fix #148
This commit is contained in:
parent
2a6ef8d0c0
commit
ea1f851d94
3 changed files with 7 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
## 0.13.1-SNAPSHOT
|
## 0.13.1-SNAPSHOT
|
||||||
|
|
||||||
* Remove any? in com.rpl.specter.impl to avoid conflict with Clojure 1.9
|
* Remove any? in com.rpl.specter.impl to avoid conflict with Clojure 1.9
|
||||||
|
* Bug fix: Fix regression from 0.13.0 where [ALL FIRST] on a PersistentArrayMap that created duplicate keys would create an invalid PersistentArrayMap
|
||||||
|
|
||||||
## 0.13.0
|
## 0.13.0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@
|
||||||
(aset array i newk)
|
(aset array i newk)
|
||||||
(aset array (inc i) newv)
|
(aset array (inc i) newv)
|
||||||
(recur (+ i 2)))))
|
(recur (+ i 2)))))
|
||||||
(clojure.lang.PersistentArrayMap. array))))
|
(clojure.lang.PersistentArrayMap/createAsIfByAssoc array))))
|
||||||
|
|
||||||
|
|
||||||
#?(:cljs cljs.core/PersistentArrayMap)
|
#?(:cljs cljs.core/PersistentArrayMap)
|
||||||
|
|
|
||||||
|
|
@ -1297,3 +1297,8 @@
|
||||||
(is (= s/NONE (afn :c :a)))
|
(is (= s/NONE (afn :c :a)))
|
||||||
(is (= data (afn :b :a)))
|
(is (= data (afn :b :a)))
|
||||||
(is (= data (afn :b :b)))))
|
(is (= data (afn :b :b)))))
|
||||||
|
|
||||||
|
(deftest duplicate-map-keys-test
|
||||||
|
(let [res (setval [s/ALL s/FIRST] "a" {:a 1 :b 2})]
|
||||||
|
(is (= {"a" 2} res))
|
||||||
|
(is (= 1 (count res)))))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue