This commit is contained in:
Nathan Marz 2016-10-02 07:48:53 -04:00
parent 2a6ef8d0c0
commit ea1f851d94
3 changed files with 7 additions and 1 deletions

View file

@ -1,6 +1,7 @@
## 0.13.1-SNAPSHOT
* 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

View file

@ -108,7 +108,7 @@
(aset array i newk)
(aset array (inc i) newv)
(recur (+ i 2)))))
(clojure.lang.PersistentArrayMap. array))))
(clojure.lang.PersistentArrayMap/createAsIfByAssoc array))))
#?(:cljs cljs.core/PersistentArrayMap)

View file

@ -1297,3 +1297,8 @@
(is (= s/NONE (afn :c :a)))
(is (= data (afn :b :a)))
(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)))))