-
Notifications
You must be signed in to change notification settings - Fork 247
Guard let in blocks is merged into the same line #494
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
Comments
Feel free to test out my fix and see if it works for you :) After my fix, your snippet gets formatted like so: myObject.didFinish = { [weak self] in
guard let self = self else { return }
self.didFinish?(self)
} |
allevato
added a commit
that referenced
this issue
Apr 11, 2023
Fix pretty printing of multi-statement closures (issue #494)
@allevato could you please close this issue? It's resolved now |
Fixed by #498. |
allevato
added a commit
to allevato/swift-format
that referenced
this issue
Jun 29, 2023
Fix pretty printing of multi-statement closures (issue swiftlang#494)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Swift-format does not add newline before guard statement in closures which is incredibly weird:
The text was updated successfully, but these errors were encountered: