Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Conversation

triplef
Copy link
Contributor

@triplef triplef commented Dec 21, 2019

Generics declarations of NSMutableArray, NSMutableDictionary, NSMutableOrderedSet, and NSMutableSet were not being passed up to superclass.

This meant that calling generic methods declared in the superclass on a subclass object were not recognized by the compiler to return a declared generic object type.

All protocol declarations that are being replaced with generics declarations are already declared by the respective superclass, and thus the list of implemented protocols does not change. Also removed unecessary protocol declarations on NSMutableIndexSet to match the other collection subclasses.

Also added missing generics declaration to NSCountedSet (subclass of NSMutableSet).

Generics declarations of NSMutableArray, NSMutableDictionary, NSMutableOrderedSet, and NSMutableSet were not being passed up to superclass.

This meant that calling generic methods declared in the superclass on a subclass object were not recognized by the compiler to return a declared generic object type.

All protocol declarations that are being replaced with generics declarations are already declared by the respective superclass, and thus the list of implemented protocols does not change. Also removed unecessary protocol declarations on NSMutableIndexSet to match the other collection subclasses.

Also added missing generics declaration to NSCountedSet (subclass of NSMutableSet).
Copy link

@DHowett-MSFT DHowett-MSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is excellent. Thank you!

@DHowett-MSFT
Copy link

I’ll run a CI build, but since it’s the holidays i can’t promise too much time spent getting this merged. :)

@davidchisnall
Copy link
Contributor

@DHowett-MSFT CI build seems not to have finished - what happened?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants