A Midje user reports a bug that is actually a Clojure behavior. Does it
count as a bug?
Consider the following:
(defn test-fn [^long x] x) ; Note hint
(defn do-something [x] (test-fn x))
(with-redefs [test-fn (fn [x] (prn :x x) x)]
(do-something "non-int"))
In Clojures from 1.5 to 1.7-alpha3, this blows up. Here's the 1.7 exception:
Exception in thread "main" java.lang.ClassCastException:
scratch.t_core$eval8616$fn__8617 cannot be cast to
clojure.lang.IFn$LO, compiling:(scratch/t_core.clj:21:36)
Changing the ^long to a ^Long allows the redef to go through.
--
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.