SwiftFormat
SwiftFormat copied to clipboard
Removing `return` in front of `try await`
Hi, we had an instance in our codebase where SwiftFormat removed return
as redundant in front of try await withCheckedThrowingContinuation { ... }
, which caused a type error. The outer function returns Void
, and withCheckedThrowingContinuation
is generic on its return type, so without return
the compiler is not able to infer that the generic parameter should be Void
too.
It seems perhaps that return
is not redundant in front of try await ...
?
Anyway, disabling redundantReturn
for that line works for now.