If you have a namespace that does something like :refer-clojure :exclude [instance?] and use def-map-type in it,
(merge instance-of-my-map-type nil)
will break because
def-map-type uses the def-abstract-type AbstractMap which defines cons like this:
|
(cons [this o] |
|
(cond |
|
(map? o) |
|
(reduce #(apply assoc %1 %2) this o) |
|
|
|
(instance? java.util.Map o) |
|
(reduce #(apply assoc %1 %2) this (into {} o)) |
|
|
|
:else |
|
(if-let [[k v] (seq o)] |
|
(assoc this k v) |
|
this))) |
and the ultimate macroexpansion copies that call to instance? directly, rather than qualifying it as clojure.core/instance?.
If you have a namespace that does something like
:refer-clojure :exclude [instance?]and usedef-map-typein it,will break because
def-map-typeuses thedef-abstract-typeAbstractMapwhich definesconslike this:potemkin/src/potemkin/collections.clj
Lines 68 to 79 in f22d972
and the ultimate macroexpansion copies that call to
instance?directly, rather than qualifying it asclojure.core/instance?.