In my case, i named my UITableView as tableView. That caused this same error:
'MyViewController' does not conform to protocol
'UITableViewDataSource'
including another error:
Candidate is not a function
And changed tableview name to something else, error is gone.