Alan Malloy <a...@malloys.org> writes: Hi Alan,
> I want to typehint the return value of f, so I put metadata on the > form representing a call to it. But if a macro gets involved, there's > an "intervening" form that ignores its metadata and returns a new list > of '(f 10) with no metadata. Thus the compiler has no idea I ever > wanted to give it a hint about the type. I'm facing the same issue. I have this macro for java interop: --8<---------------cut here---------------start------------->8--- (defmacro with-traversal-context [[g tc] & body] `(let [old-tc# (.getTraversalContext ^Graph ~g)] (try (.setTraversalContext ^Graph ~g ^TraversalContext ~tc) ~@body (finally (.setTraversalContext ^Graph ~g ^TraversalContext old-tc#))))) --8<---------------cut here---------------end--------------->8--- But the type hints are gone in the macro expansion, thus I have 3 reflection warnings per macro application, and real, performance critical reflection warnings get lost in the shuffle. Is there a way to suppress reflection warnings only in a given scope, i.e., something like a `do' in whose body no reflection warnings are issued? Bye, Tassilo -- (What the world needs (I think) is not (a Lisp (with fewer parentheses)) but (an English (with more.))) Brian Hayes, http://tinyurl.com/3y9l2kf -- 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