Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-7230] Improve error message for statement that begins with open brace #49778

Open
jckarter opened this issue Mar 19, 2018 · 0 comments
Open
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation good first issue Good for newcomers

Comments

@jckarter
Copy link
Member

Previous ID SR-7230
Radar None
Original Reporter @jckarter
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, DiagnosticsQoI, StarterBug
Assignee None
Priority Medium

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.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant