错误:Generic parameter ‘ResultType’ could not be inferred
swift版本:3.0
Xcode版本:8.0
错误原因:声明NSFetchRequest类型的时候没能指定其类型
错误源码:
let fetchRequest:NSFetchRequest = NSFetchRequest(entityName: "Person")
修正源码:
let fetchRequest:NSFetchRequest = NSFetchRequest<NSFetchRequestResult>(entityName: "Person")
简洁版:
let fetchRequest = NSFetchRequest<NSFetchRequestResult>(entityName: "Person")
参考: