-
Notifications
You must be signed in to change notification settings - Fork 70
Add safe upcasting #518
Copy link
Copy link
Closed
Labels
A-frameworkAffects the framework crates and the translator for themAffects the framework crates and the translator for themA-objc2Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` cratesAffects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` cratesenhancementNew feature or requestNew feature or request
Milestone
Metadata
Metadata
Assignees
Labels
A-frameworkAffects the framework crates and the translator for themAffects the framework crates and the translator for themA-objc2Affects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` cratesAffects the `objc2`, `objc2-exception-helper` and/or `objc2-encode` cratesenhancementNew feature or requestNew feature or request
We already have the ability to convert from
NSViewto its superclassesNSResponderusingDeref,ClassType::as_superorId::into_super. In general, we should maybe consider anUpCasttrait of some sort, to be able to do this fully generically? Even better if it could integrate with aFromimplementation forId.See also the inverse of this in #474.