You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a weird one. I guess it's because an if/switch expression has to return the same result type on each branch? In normal functions this is already enforced by the function having a single result type, but that's not the case for a function with an opaque result type.
I think the fix would be to fixable the redundantReturn if/switch expression functionality within functions that return a some opaque result type.
Swift compiler cannot infer return type without explicit
return
.SwiftFormat
removes returns from the above code, which makes compilation break because of the following error:Looks like an additional use-case to #1751 and #1749
Setup:
SwiftFormat
version: 0.54.3conditionalAssignment
andredundantReturn
are enabledSwift
version 5.9The text was updated successfully, but these errors were encountered: