Hi,
Is it a bug or I'm doing something wrong? I can't get rid of
auto-boxing in the second example, neither by type hinting nor by type
coercing of "changed*" locals.
(set! *warn-on-reflection* true)
This compiles fine:
(loop [x 1 changed 0]
(if (= x 10)
changed
(recur (inc x)
changed)))
And this gives the warning "recur arg for primitive local: changed is
not matching primitive, had: Object, needed: long
Auto-boxing loop arg: change"
(loop [x 1 changed 0]
(if (= x 10)
changed
(recur (inc x)
(loop [y 1 changed-y changed]
changed-y))))
P.S. I omitted recur for the inner loop for clarity.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en