Fork me on GitHub
#clojure-spec
<
2017-12-29
>
souenzzo13:12:47

I think that this is a bug @ikitommi

ikitommi14:12:18

thanks @souenzzo, wrote CLJ-2302. As a workaround, I’m forcing all the incoming spec to be Specs (or names of Specs):

(defn merge-specs [specs]
  (when-let [non-specs (seq (remove #(or (s/spec? %) (s/get-spec %)) specs))]
    (throw
      (ex-info
        (str "Not all specs satisfy the Spec protocol: " non-specs)
        {:specs specs
         :non-specs non-specs})))
  (s/merge-spec-impl (vec specs) (vec specs) nil))