[SR-7230] Improve error message for statement that begins with open brace #49778
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
good first issue
Good for newcomers
Additional Detail from JIRA
md5: 809fd159923a9a4b4bcf2169a9eb2a66
Issue Description:
Swift doesn't allow a statement to begin with an open brace, and the error message you get when you do is hostile to beginners, talking about "unused closures" rather than the syntactic issue:
https://twitter.com/twostraws/status/975740708601593857
This is likely to come up when a user is moving code around, so the error and associated fixits could be greatly improved.
The text was updated successfully, but these errors were encountered: