-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Open
Labels
compilerThe Swift compiler itselfThe Swift compiler itselfdiagnostics QoIBug: Diagnostics Quality of ImplementationBug: Diagnostics Quality of Implementationimprovement
Description
Previous ID | SR-9030 |
Radar | None |
Original Reporter | @mattneub |
Type | Improvement |
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Improvement, DiagnosticsQoI |
Assignee | None |
Priority | Medium |
md5: 7e8e1a5e1380eef1796eec2be27b68a0
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.
Metadata
Metadata
Assignees
Labels
compilerThe Swift compiler itselfThe Swift compiler itselfdiagnostics QoIBug: Diagnostics Quality of ImplementationBug: Diagnostics Quality of Implementationimprovement