Hi,

The way preconditions are invoked in Clojure 1.3.0 seems to have
changed since Clojure 1.2:
(defmacro foo
  [bar & body]
  {:pre [(string? bar)]}
  ...)

(foo "bar34" ...)  ; doesn't complain, which is OK
(foo (str "baz" 34) ...)  ; Error! (I wanted this to pass)

When I write the precondition like this:

  {:pre [`(string? ~bar)]}

It doesn't seem to check the precondition at all in 1.3.0.

Can somebody suggest me what am I missing? I want both the examples
above to be verified and passed as OK.

Shantanu

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