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

Auto generate property initialisers #5

Open
helje5 opened this issue Sep 26, 2023 · 0 comments
Open

Auto generate property initialisers #5

helje5 opened this issue Sep 26, 2023 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@helje5
Copy link
Contributor

helje5 commented Sep 26, 2023

If the dev didn't specify an own initialiser, the macro should generate one, similar to what Swift itself already does for structures.

E.g.:

@Model class Item: NSManagedObject {
  var date : Date
}

Should generate:

convenience init(date: Date) {
  self.init()
  self.date = date
}

The code for this is already prepared in the Model macro, needs to be finished.

@helje5 helje5 added enhancement New feature or request help wanted Extra attention is needed labels Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant