-
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 itselfdeclarationsFeature: declarationsFeature: declarationsdiagnostics QoIBug: Diagnostics Quality of ImplementationBug: Diagnostics Quality of Implementationerror handlinginheritanceFeature → type declarations → class: Subclassing and inheritance of class membersFeature → type declarations → class: Subclassing and inheritance of class membersinitFeature → declarations: InitializersFeature → declarations: Initializersswift 6.0type checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis
Description
Previous ID | SR-14291 |
Radar | rdar://problem/74876041 |
Original Reporter | @YOCKOW |
Type | Bug |
Environment
Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
Target: x86_64-apple-darwin20.3.0
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Bug, DiagnosticsQoI |
Assignee | None |
Priority | Medium |
md5: 9a5fd6b71ce55da5783b9975045cb234
Issue Description:
Try to compile the following code:
class C {
init() throws {}
}
class D: C {
let i: Int
init(i: Int) {
self.i = i
}
}
The compiler views error like
<unknown>:0: error: call can throw, but it is not marked with 'try' and the error is not handled
.
D
seems to call super.init
implicitly, but the error message doesn't imply it.
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 itselfdeclarationsFeature: declarationsFeature: declarationsdiagnostics QoIBug: Diagnostics Quality of ImplementationBug: Diagnostics Quality of Implementationerror handlinginheritanceFeature → type declarations → class: Subclassing and inheritance of class membersFeature → type declarations → class: Subclassing and inheritance of class membersinitFeature → declarations: InitializersFeature → declarations: Initializersswift 6.0type checkerArea → compiler: Semantic analysisArea → compiler: Semantic analysis