bigdec does not properly convert a clojure.lang.BigInt

Description

bigdec handles java.math.BigInteger when converting to java.math.BigDecimal, but it does not handle clojure.lang.BigInt. Instead it treats a clojure.lang.BigInt as a Number, by casting it to long. This causes the following error:

Clojure 1.4.0-beta3
user=> (bigdec (inc (bigint Long/MAX_VALUE)))
IllegalArgumentException Value out of range for long: 9223372036854775808 clojure.lang.RT.longCast (RT.java:1123)

Environment

None

Status

Assignee

Unassigned

Reporter

Paul Stadig

Labels

None

Approval

Ok

Patch

Code and Test

Fix versions

Affects versions

Release 1.4
Release 1.3

Priority

Major
Configure