-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Closed
Copy link
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-3599 |
| Radar | rdar://problem/26856950 |
| Original Reporter | @belkadan |
| Type | Improvement |
| Status | Closed |
| Resolution | Done |
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Compiler |
| Labels | Improvement, DiagnosticsQoI, Parser, StarterBug |
| Assignee | jceciliani (JIRA) |
| Priority | Medium |
md5: 29eeeaf8d8066280f10404bd103f9e82
relates to:
- SR-3600 Better recovery for trying to name an initializer, deinitializer, or subscript
Issue Description:
Nothing stops a new coder from writing something like func do something(), especially in Swift Playgrounds where we expect users who have never coded before. We should diagnose this with a nice note like "function names cannot have spaces in them", and offer a fix-it to camel-case the name instead.
(This also applies to types, where this is probably not too difficult, and properties / variables / constants, where it's a bit harder due to how patterns are parsed.)
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