Hi
As title, when trying to use NSFetchedResultsController I get the following error:
'>' is not a postfix unary operator
class WindowController: NSObject, ObservableObject {
@Published var spans: [Span] = []
private let controller = NSFetchedResultsController<Windows>
init(context: NSManagedObjectContext) {
controller = NSFetchedResultsController(fetchRequest: Windows.fetchRequest(), managedObjectContext: context, sectionNameKeyPath: nil, cacheName: nil)
}
}
I can get it to work by changing it to
private var controller = NSFetchedResultsController<Windows>()
but I'm wondering what's going on with the original code.