Clojure

long cast is not checked for Object decimal types

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major 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

E.g.:

user=> (*' Long/MAX_VALUE 100M)
922337203685477580700M
user=> (long *1)
-100
user=> (Double/valueOf Double/MAX_VALUE)
1.7976931348623157E308
user=> (long *1)
9223372036854775807

And the numbers.clj test erroneously considers truncation as correct.

  1. check-longs.patch
    28/Apr/11 2:17 AM
    3 kB
    Alexander Taggart
  2. check-longs-update-1.patch
    29/Apr/11 2:00 PM
    3 kB
    Alexander Taggart

Activity

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: