-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Closed
Copy link
Labels
compilerThe Swift compiler itselfThe Swift compiler itselfdiagnostics QoIBug: Diagnostics Quality of ImplementationBug: Diagnostics Quality of Implementationgood first issueGood for newcomersGood for newcomersimprovement
Description
| Previous ID | SR-3168 |
| Radar | rdar://problem/25583673 |
| Original Reporter | @belkadan |
| Type | Improvement |
| Status | Resolved |
| Resolution | Done |
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Compiler |
| Labels | Improvement, DiagnosticsQoI, StarterBug |
| Assignee | @belkadan |
| Priority | Medium |
md5: 3712ee5c89fa28d178516e90e2ba9a8f
Issue Description:
import UIKit
class C: NSObject, UICollectionViewDelegate {
optional internal func indexPathForPreferredFocusedView(in collectionView: UICollectionView) -> IndexPath? {
return nil
}
}
<stdin>:5:5: error: 'optional' can only be applied to protocol members
optional internal func indexPathForPreferredFocusedView(in collectionView: UICollectionView) -> IndexPath? {
^
There should be a fix-it to remove the "optional".
Metadata
Metadata
Assignees
Labels
compilerThe Swift compiler itselfThe Swift compiler itselfdiagnostics QoIBug: Diagnostics Quality of ImplementationBug: Diagnostics Quality of Implementationgood first issueGood for newcomersGood for newcomersimprovement