在以下线程中的讨论之后打开了此bug:
https://groups.google.com/forum/#!topic/clojure/r8WO24rHsi0
基本上,当使用s/merge与s/or时,s/conform返回的不能被s/unform的结构。
重现步骤(大胆复制自线程)
(require '[clojure.spec.alpha :as s])
(s/def ::a (s/or :even even? :odd odd?))
(s/def ::b (s/or :even even? :odd odd?))
(s/def ::m1 (s/keys :req-un [::a]))
(s/def ::m2 (s/keys :req-un [::b]))
(s/def ::mm (s/merge ::m1 ::m2))
(s/valid? ::mm {:a 1 :b 2})  ANJI; true
(s/conform ::mm {:a 1 :b 2})
;;=> {:a 1, :b [:even 2]}
(s/unform ::mm {:a [:odd 1] :b [:even 2]})
;;=> {:a 1, :b [:even 2]}
(s/unform ::mm (s/conform ::mm {:a 1 :b 2}))