-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Open
Labels
compilerThe Swift compiler itselfThe Swift compiler itselfdiagnostics QoIBug: Diagnostics Quality of ImplementationBug: Diagnostics Quality of Implementationimprovement
Description
| Previous ID | SR-8867 |
| Radar | None |
| Original Reporter | @mattneub |
| Type | Improvement |
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Compiler |
| Labels | Improvement, DiagnosticsQoI |
| Assignee | None |
| Priority | Medium |
md5: 11e0a5dbc64b0db877509024dc5754de
Issue Description:
This yields a nice warning about the unused constant:
func test() {
let x = 1 // warning
}This doesn't:
func test() {
let x = 1 // no warning
func inner() {
}
}The local function seems to make the compiler's analysis-foo go away.
Metadata
Metadata
Assignees
Labels
compilerThe Swift compiler itselfThe Swift compiler itselfdiagnostics QoIBug: Diagnostics Quality of ImplementationBug: Diagnostics Quality of Implementationimprovement