-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Open
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 Implementationgood first issueGood for newcomersGood for newcomers
Description
| Previous ID | SR-1715 |
| Radar | None |
| Original Reporter | manuyavuz (JIRA User) |
| Type | Bug |
Environment
Xcode 7.3.1 default toolchain
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Compiler |
| Labels | Bug, DiagnosticsQoI, StarterBug |
| Assignee | step (JIRA) |
| Priority | Medium |
md5: 6ce9ad56a254833eb119945d8b995454
Issue Description:
Hi,
The following simple code
class MyProxy: NSProxy {
init(value : Int) {
} // Compiler error here
}
gives
Super.init isn't called on all paths before returning from initializer
compiler error.
I can't call super.init() because NSProxy class does not have one.
This means a Swift type can not be subclasses from NSProxy class.
Is this intentional? If so, I think this class should be unavailable while writing Swift code, or at least have a warning in documentation or code reference.
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 Implementationgood first issueGood for newcomersGood for newcomers