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.
Also desirable: Some unsafe way to cast only the generics, e.g. NSArray<T>::cast_objects_unchecked<U>(self) -> NSArray<U>.
It'd be nice to have conversions to superclasses in collection types that use lightweight generics, i.e. some way to turn
NSArray<NSView>intoNSArray<NSResponder>, or evenNSArray<NSObject>.Note that this is only valid for
__covariantimmutable generic types, e.g.NSArray, but notNSMutableArray(see also this video from WWDC2015, timestamp around 23:40).Related to #518 and might require a trait like in #271.
Also desirable: Some unsafe way to cast only the generics, e.g.
NSArray<T>::cast_objects_unchecked<U>(self) -> NSArray<U>.