On Nov 19, 6:34 pm, "nicolas.o...@gmail.com" <nicolas.o...@gmail.com> wrote: > I found a minimal case: > > (defprotocol A (f [x])) > > (deftype T [ ^{:unsynchronized-mutable true} ^int a] A > (f [x] (loop [c 0] > (set! a c)))) > > (class: user/T, method: f signature: ()Ljava/lang/Object;) Expecting > to find integer on stack > > The problem disappear with let instead of loop. > > It seems that Clojure creates c as a long a long and do not put a > conversion before setting to the int variable.
Yes, 1.3 supports only long and double primitives as local variables. But the bug doesn't seem to be new. I get the same error if I try to assign an int into a long deftype field in 1.2. -- Juha Arpiainen -- 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