Details
-
Type:
Defect
-
Status:
Closed
-
Priority:
Major
-
Resolution: Completed
-
Affects Version/s: None
-
Fix Version/s: Release 1.3
-
Component/s: None
-
Labels:None
-
Patch:Code and Test
-
Approval:Ok
Description
Clojure 1.3.0-alpha4 user=> (-' 0 -9223372036854775808) -9223372036854775808
This looks like a case where, in minusP, negateP was properly promoting the negation of -9223372036854775808 (Long/MIN_VALUE) to a BigInt, but that promotion didn't propagate to addP. The Ops that got used in addP was ops(-9223372036854775808), not ops(9223372036854775808N).
The attached patch makes sure the BigInt contamination goes all the way through, and adds a few tests verifying the correct behavior.