-
Notifications
You must be signed in to change notification settings - Fork 62
Open
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
Description
It would be nice if icrate could mark certain protocols / methods as safe to override, such that define_class! could (after checking that all types are the same) allow just doing:
define_class!(
// ...
impl MyClass {
#[method_id(init)]
fn init(this: Allocated<Self>) -> Id<Self> {
todo!()
}
}
impl MyProtocol for MyClass {
#[method(protocolMethod)]
fn protocol_method(&self) {}
}
);(Notice the lack of unsafe impl)
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