SwiftFormat
SwiftFormat copied to clipboard
redundantVoidReturnType removes returned closure in 0.55.5
In this example in 0.55.5:
public protocol FooProtocol {
func foo(bar: Bar) -> () throws -> Void
}
When applying redundantVoidReturnType, it will always return:
public protocol FooProtocol {
func foo(bar: Bar) -> throws
}
...even when passing --closurevoid preserve. Since the above intends to return a closure, it breaks call sites that expected a closure from foo(bar:).