s/def docs says: "Given a namespace-qualified keyword or resolvable symbol 
..."

But I'm unable to s/def a spec using a resolvable symbol:

(def foo 123)
(s/def foo int?)
(s/get-spec foo) => nil
(s/get-spec 'foo) => nil
(s/get-spec #'foo) => #object[clojure.spec.alpha$spec_impl$reify__797 
0x7215d8f3 "clojure.spec.alpha$spec_impl$reify__797@7215d8f3"]

So it works with the var, but not the symbol. Also, doing (s/def 'foo int?) 
fails with an assertion error.

Is it true that specs can be registered with the key being a 
namespace-qualified keyword, a resolvable symbol or a Var? Or is the doc 
misleading?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to