On Mar 7, 2:50 pm, Darshan Shaligram <
scinti...@gmail.com> wrote:
> When experimenting with Clojure multimethods and *warn-on-reflection*
> on Clojure svn r725, I found that defmethod produces this warning:
>
> Reflection warning, line: 829 - call to assoc can't be resolved.
>
> I'm guessing a type hint to clojure.lang.MultiFn in boot.clj:829 will
> fix this. The code involved (admittedly silly) was:
>
> (def *warn-on-reflection* true)
> (defmulti laborious-evenp
> (fn [x] (if (zero? (rem x 2)) :even :odd)))
> (defmethod laborious-evenp :even [x] true)
> (defmethod laborious-evenp :odd [x] false)
>