-
Notifications
You must be signed in to change notification settings - Fork 616
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
strongifiedSelf
strips some necessary backticks
#1670
Comments
strongifiedSelf
strips some necessary backticksstrongifiedSelf
strips some necessary backticks
@heiberg I've not been able to reproduce this in 0.53.5 or 0.53.6. It's possible that the bug depends on some surrounding context - could you provide the whole method? (or whatever minimal code is needed to reproduce the problem in isolation) |
Sure! Sorry for the delay, I missed the notification here. Inputclass Hello {
func foo() {
nonisolated(unsafe) let `self` = self
}
} Command
Expected OutputUnchanged. Observed Outputclass Hello {
func foo() {
nonisolated(unsafe) let self = self
}
} Unexpected change: class Hello {
func foo() {
- nonisolated(unsafe) let `self` = self
+ nonisolated(unsafe) let self = self
}
} EnvironmentSwiftFormat 0.53.5 |
@nicklockwood Was this issue reproducible given the above? |
@heiberg sorry, I also missed this update. I believe the issue was that the issue only arises when |
@heiberg fixed in 0.53.10 |
Description
Swift 5.10 (Xcode 15.3) introduced the
nonisolated(unsafe)
keyword.In the following line the backticks are required:
The
strongifiedSelf
rule strips these, which results in the errorNote that the example here is not strongifying a weak
self
, but rather declaring a non-isolated version ofself
(useful in certain test cases) .Environment
The text was updated successfully, but these errors were encountered: