On Sun, May 29, 2011 at 4:35 PM, bOR_ <boris.sch...@gmail.com> wrote:
> Thanks for the help, appreciated! It helped me figuring out where exactly > things go haywire. > > This works: > user> (let [^ints as (make-array Integer/TYPE 10)] (aset as 0 (+ (aget as > 1) (aget as 2)))) > > 0 > > and this breaks > > user> (let [^shorts as (make-array Short/TYPE 10)] (aset as 0 (+ (aget as > 1) (aget as 2)))) > No matching method found: aset > > What am I doing wrong? > You need to cast to short. (aset as 0 (short (+ (aget as 1) (aget as 2)))) David -- 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