Hi,

2010/3/10 Brian Hurt <bhur...@gmail.com>:
> In a recent clojure:
>
> user=> (class 2147483647)
> java.lang.Integer
> user=> (class (inc 2147483647))
> java.math.BigInteger

upcasted to BigInteger because of overflow detection in IntegerOps,
even though a cast to Long would be sufficient. Also odd because of:

user> (class (+ 2147483647 1))
java.lang.Long

> user=> (class (inc (inc 2147483647)))
> java.lang.Long

BigIntegerOps reduces to Long if possible.

> This isn't *technically* a bug, but it is an odd behavior.

fixed by this:

http://github.com/juergenhoetzel/clojure/commit/a47e9cc9f1a8434b677184848c641f19ed455b54

Jürgen

-- 
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

Reply via email to