Clojure

Automatic type translation from Integer to Long

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: Release 1.3
  • Component/s: None
  • Labels:
    None

Description

In some cases types can get lost:

(def i1 (Integer. "100"))
(def i2 (Integer/valueOf 100))

[(class i1) (class i2)]
==> [java.lang.Integer java.lang.Long]

;; expected ==> [java.lang.Integer java.lang.Integer]

;; But: (class (Integer/valueOf 100)) ==> java.lang.Integer

Works correspondingly for Floats, which become Doubles.

Activity

No changes have yet been made on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: