Clojure

get/= on sorted collections when types don't match result in a ClassCastException

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: Release 1.5, Release 1.6
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code and Test
  • Approval:
    Triaged

Description

user=> (= (sorted-set 1) #{:a})
ClassCastException java.lang.Long cannot be cast to clojure.lang.Keyword clojure.lang.Keyword.compareTo (Keyword.java:109)

but

user=> (= (sorted-set 1) :a)
false

also

user=> (get (sorted-set 1) :a 2)
ClassCastException java.lang.Long cannot be cast to clojure.lang.Keyword clojure.lang.Keyword.compareTo (Keyword.java:109)

Activity

Alex Miller made changes -
Field Original Value New Value
Approval Triaged [ 10120 ]
Priority Minor [ 4 ] Major [ 3 ]
Stuart Halloway made changes -
Priority Major [ 3 ] Minor [ 4 ]

People

Vote (4)
Watch (3)

Dates

  • Created:
    Updated: