-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Open
Labels
SILcompilerThe 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-8811 |
Radar | None |
Original Reporter | @CodaFi |
Type | Improvement |
Status | Reopened |
Resolution |
Additional Detail from JIRA
Votes | 0 |
Component/s | Compiler |
Labels | Improvement, SILDiagnostics, StarterBug |
Assignee | None |
Priority | Medium |
md5: fe8546f9296464e8c547c7c953e07a35
Issue Description:
Try to emit SIL for the following code
enum Empty {}
class Foo {
var x: Empty // function with uninhabited return type 'Empty' is missing call to another never-returning function on all paths
init(_ x: Empty) {
self.x = x
}
}
It's good that we error, it's dismaying that we're diagnosing an implicit declaration. In particular, we're diagnosing the getter. We should check for accessors and emit something specialized here.
Metadata
Metadata
Assignees
Labels
SILcompilerThe Swift compiler itselfThe Swift compiler itselfdiagnostics QoIBug: Diagnostics Quality of ImplementationBug: Diagnostics Quality of Implementationgood first issueGood for newcomersGood for newcomersimprovement