Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed generics declarations for collection subclasses. #2938

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants