metosin / spec-tools

Clojure(Script) tools for clojure.spec
Eclipse Public License 2.0
593 stars 94 forks source link

Unable to parse spec with s/nonconforming #263

Open SevereOverfl0w opened 3 years ago

SevereOverfl0w commented 3 years ago
user=> (spec-tools.parse/parse-spec (s/nonconforming int?))
{:type nil}

I believe this defmethod is correct though, s/nonconforming only needs to delegate immediately to "pass through" the spec it is wrapping.

(defmethod spec-tools.parse/parse-form 'clojure.spec.alpha/nonconforming [_ form options]
  (spec-tools.parse/parse-spec-with-spec-ref (second form) options))
ikitommi commented 3 years ago

PR welcome!