Welcome! Please see the About page for a little more info on how this works.

0 votes
in Spec by

~  clj
Clojure 1.9.0
user=> (require '[clojure.spec.alpha :as s])
nil
user=> (require '[clojure.core.specs.alpha])
nil
(let [spec (:args (s/get-spec `defn))
        form `(~'foo ([~'a] 1) [~'a ~'b])]
    {:valid (s/valid?
             spec
             form)
     :explain-data (s/explain-data
                    spec
                    form)})
{:valid false, :explain-data nil}
user=>


Expected: If form is invalid, explain-data should not be nil

1 Answer

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJ-2336 (reported by bbrinck)
...