Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redundantVoidReturnType removes returned closure in 0.55.5 #1978

Open
alanzeino opened this issue Feb 18, 2025 · 0 comments
Open

redundantVoidReturnType removes returned closure in 0.55.5 #1978

alanzeino opened this issue Feb 18, 2025 · 0 comments

Comments

@alanzeino
Copy link

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:).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant