-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
compilerThe Swift compiler itselfThe Swift compiler itselfdiagnostics QoIBug: Diagnostics Quality of ImplementationBug: Diagnostics Quality of Implementationgood first issueGood for newcomersGood for newcomersimprovementparserArea → compiler: The legacy C++ parserArea → compiler: The legacy C++ parser
Description
| Previous ID | SR-3167 |
| Radar | rdar://problem/25881880 |
| Original Reporter | @belkadan |
| Type | Improvement |
| Status | Closed |
| Resolution | Done |
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Compiler |
| Labels | Improvement, DiagnosticsQoI, Parser, StarterBug |
| Assignee | @belkadan |
| Priority | Medium |
md5: dfc0ab758b4f132463ad177824c23f7f
Issue Description:
func switch() { }
repl.swift:1:6: error: expected identifier in function declaration
func switch() { }
^
We can do better than this. Someone inside Apple suggested "keyword 'switch' found where an identifier should be in a function's name. Try picking a different name for the function or putting backticks (`) around the name." The suggested fixes (the second sentence) should probably be two separate notes rather than crammed into the main diagnostic.
Metadata
Metadata
Assignees
Labels
compilerThe Swift compiler itselfThe Swift compiler itselfdiagnostics QoIBug: Diagnostics Quality of ImplementationBug: Diagnostics Quality of Implementationgood first issueGood for newcomersGood for newcomersimprovementparserArea → compiler: The legacy C++ parserArea → compiler: The legacy C++ parser