-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
@NSManaged
doesn't allow this:
@Model class Item: NSManagedObject {
var date = Date()
}
This complains that the @NSManaged var item
must not have initialization expressions.
I don't think a macro can remove the expression, but maybe the property could be shadowed somehow. Which would also potentially help w/ Issue #2 .
I.e. instead of generating:
@NSManaged var date : Date
something more like:
var date = Date() {
didSet { _date = newValue }
}
@objc(date)
@NSManaged var _date : Date
Potentially possible, not quite sure. That the _date
is renamed might pose the biggest issue here.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed