-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfdiagnostics QoIBug: Diagnostics Quality of ImplementationBug: Diagnostics Quality of Implementation
Description
| Previous ID | SR-4024 |
| Radar | rdar://problem/30643549 |
| Original Reporter | @rudkx |
| Type | Bug |
| Status | Resolved |
| Resolution | Done |
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Compiler |
| Labels | Bug, DiagnosticsQoI |
| Assignee | KingOfBrian (JIRA) |
| Priority | Medium |
md5: b05c2a7936711a587ba3f144cc07244f
Issue Description:
For this test case:
import Foundation
class Base: NSObject {
var a: Int { return 0 }
}
class Derived: Base {}
extension Derived {
override var a: Int { return 1 }
}We emit diagnostics two times for the overrides in the extensions:
ex.swift:10:16: warning: cannot override a non-dynamic class declaration from an extension
override var a: Int { return 1 }
^
ex.swift:4:7: note: overridden declaration is here
var a: Int { return 0 }
^
ex.swift:10:23: warning: cannot override a non-dynamic class declaration from an extension
override var a: Int { return 1 }
^
ex.swift:4:14: note: overridden declaration is here
var a: Int { return 0 }Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfdiagnostics QoIBug: Diagnostics Quality of ImplementationBug: Diagnostics Quality of Implementation