Open mattneub opened 5 years ago
Issue Description:
class C : NSObject, UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return 1 } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { return UITableViewCell() } func test() { _ = self.tableView.indexPathForSelectedRow // error: ambiguous reference // to member 'tableView(_:numberOfRowsInSection:)' } }
There's no ambiguous reference to anything. The problem, quite unambiguously, is that `self.tableView` is not a thing.
self.tableView is a thing; in fact it's many things: all of the delegate functions. But the compiler should say that, and not just pick one of them and pretend it's what you typed.
self.tableView
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Improvement, DiagnosticsQoI | |Assignee | None | |Priority | Medium | md5: 7e8e1a5e1380eef1796eec2be27b68a0Issue Description:
There's no ambiguous reference to anything. The problem, quite unambiguously, is that `self.tableView` is not a thing.