Oof. We have that warning in Clang, but we should certainly have it in Swift as well. For any new warning, though, it's important to have a way to silence it to say "yes, I really do want to recheck self for each of these calls."
A definitely terrible way to signal that you want to silence the warning would be to chain multiple calls to self. This is legal:
{ [weak self] in
self?.self.prepare()
self?.self.doWork()
self?.self.cleanup()
}
The fixit could suggest that, and the compiler could use it to infer that you actually meant to have the separate references. But please, please don't solve it like this. I regret posting it, and I haven't even hit the button yet.
I do this to encapsulate long promise chains that need many weak captures. It works pretty well, but I wouldn't do it for synchronous work, just closures.