-
Notifications
You must be signed in to change notification settings - Fork 69
declare_class!: Safer initializers #438
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
Description
Use something similar to Swift's rules for initializers, which we may be able to with a combination of types and a proc-macro, to verify that initializers only access the things that they are allowed to.
Should also somehow make ivars safe to declare, by statically ensuring that they are initialized - i.e. this issue ties in heavily with #414).
See also the Objective-C docs on initialization and a bit more about designated initializers.
Reactions are currently unavailable
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