Does the new primitive support added in 1.3 extend to anonymous functions?

If so, I am doing something wrong because I can't get them to work:

(definterface IPrimitiveTester
  (getType [^int x])
  (getType [^long x])
  (getType [^float x])
  (getType [^double x])
  (getType [^Object x]))

(deftype PrimitiveTester []
  IPrimitiveTester
  (getType [this ^int x] :int)
  (getType [this ^long x] :long)
  (getType [this ^float x] :float)
  (getType [this ^double x] :double)
  (getType [this ^Object x] :object))

(defmacro pt [x]
  `(.getType (PrimitiveTester.) ~x))

(defn with-defn ^double [^double x]
  (+ x 0.5))


(def with-def (fn ^double [^double x]
                (+ x 0.5)))


(pt (with-defn 1.0)) ; => :double

(pt (with-def 1.0)) ; => :object



So.. is the above user error, known limitation, bug, or new issue?

Thanks,
Ben

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