I'm getting a compiler error with the following code. Scores
is dynamically generated data entity (Codegen - Class Defnition). The exact error is:
Cannot convert value of type 'NSFetchRequest<Scores>' to expected argument type 'NSFetchRequest<NSFetchRequestResult>'
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
let request: NSFetchRequest<Scores> = Scores.fetchRequest()
do {
scores = try context.fetch(request)
} catch {
print("Error")
}
tableView.reloadData()
}
The error occurs on the context.fetch()
call. Xcode 8.2.1