Hi, I'm using macros to define special vars (w/ a keyword as type) to
retrieve them later with ns-utils/ns-vars and filter them. I don't
know if this technique is recommended or if there's some better way to
achieve this, but there's something weird happening when we try to
evaluate the var defined at the REPL. For example, if you run this
code:

(defmacro defbar [foo & body]
  `(def ~(with-meta foo {:type ::MyType})
     (eval ~...@body)))

(defbar baz (+ 1 1))

It throws a ClassCastException: "clojure.lang.Var cannot be cast to
clojure.lang.IObj", which is an error I encountered often and never
truly understood. Can somebody help me find out what I'm missing?

Thanks

- budu
-- 
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

Reply via email to