Uploaded image for project: 'core.typed'
  1. CTYP-15

Eliminate the need to specify all ancestors in alter-class.

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Declined
    • Affects versions: None
    • Fix versions: Backlog
    • Components: Clojure Checker
    • Labels:

      Description

      We should be able to elide at least a couple of these annotations.

      PersistentHashSet [[[a :variance :covariant]]
                         :replace
                         {Seqable (Seqable a)
                          java.util.Set (java.util.Set a)
                          Iterable (Iterable a)
                          Collection (Collection a)
                          APersistentSet (APersistentSet a)
                          IPersistentSet (IPersistentSet a)
                          IPersistentCollection (IPersistentCollection a)}
                         :unchecked-ancestors
                         #{[Any -> (U a nil)]}]
      

      I think just override APersistentSet should infer the rest.

      PersistentHashSet [[[a :variance :covariant]]
                         :replace
                         {APersistentSet (APersistentSet a)}
                         :unchecked-ancestors
                         #{[Any -> (U a nil)]}]
      

      :unchecked-ancestors is a different problem.

        Attachments

          Activity

            People

            • Assignee:
              ambrosebs Ambrose Bonnaire-Sergeant
              Reporter:
              ambrosebs Ambrose Bonnaire-Sergeant
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: