Uploaded image for project: 'Clojure'
  1. CLJ-2325

= on sorted collections with different key types still incorrectly throws

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects versions: Release 1.9
    • Fix versions: None
    • Labels:

      Description

      CLJ-1242 Closed partially fixed = throwing an exception when comparing with sorted collections, but there are still cases where this will throw.

      (= {:todos 1} (sorted-map 1 2))
      
      ClassCastException java.lang.Long cannot be cast to clojure.lang.Keyword  clojure.lang.Keyword.compareTo (Keyword.java:114)
      

      Some of the tests in the original patch on CLJ-1242 Closed also still throw exceptions. - https://dev.clojure.org/jira/secure/attachment/12084/0001-fix-for-CLJ-1242-tests.patch.

      Note that this is not symmetrical, the reverse doesn't throw.

      (def a {:todos 1})
      (def b (sorted-map 1 2))
      
      (= a b)
      => <throws>
      (= b a)
      => false
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              desk@danielcompton.net Daniel Compton
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated: