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

Upcasting generic collections #654

Open
madsmtm opened this issue Sep 19, 2024 · 0 comments
Open

Upcasting generic collections #654

madsmtm opened this issue Sep 19, 2024 · 0 comments
Labels
A-framework Affects the framework crates and the translator for them enhancement New feature or request

Comments

@madsmtm
Copy link
Owner

madsmtm commented Sep 19, 2024

It'd be nice to have conversions to superclasses in collection types that use lightweight generics, i.e. some way to turn NSArray<NSView> into NSArray<NSResponder>, or even NSArray<NSObject>.

Note that this is only valid for __covariant immutable generic types, e.g. NSArray, but not NSMutableArray (see also this video from WWDC2015, timestamp around 23:40).

Related to #518 and might require a trait like in #271.

@madsmtm madsmtm added enhancement New feature or request A-framework Affects the framework crates and the translator for them labels Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-framework Affects the framework crates and the translator for them enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant