Clojure

Numbers as keys in maps must be of the same class to match

Details

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

Description

In maps, numbers need to be of the same class to match:

({(BigInteger. "1") "one"} 1) => nil
({(Long. "1") "one"} 1) => nil
({(Integer. "1") "one"} 1) => "one"

although:

(= (BigInteger. "1") 1) => true
(= (Long. "1") 1) => true

Activity

Hide
Assembla Importer added a comment -
Show
Assembla Importer added a comment - Converted from http://www.assembla.com/spaces/clojure/tickets/279

People

  • Assignee:
    Unassigned
    Reporter:
    Anonymous
Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: