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

@Sendable should not be allowed to precede @escaping #78489

Open
mattmassicotte opened this issue Jan 8, 2025 · 0 comments
Open

@Sendable should not be allowed to precede @escaping #78489

mattmassicotte opened this issue Jan 8, 2025 · 0 comments
Labels
feature A feature request or implementation triage needed This issue needs more specific labels

Comments

@mattmassicotte
Copy link
Contributor

Motivation

Today, this code compiles.

func myFunction(_ closure: @Sendable @escaping () -> Void) {
}

Proposed solution

@sendable is part of the type. I think this is just a parsing quirk.

Alternatives considered

I suppose would could just leave this as-is. But it allows for some pretty muddy and confusing syntax. Fixing this is a breaking change, but I still think it should be addressed.

Additional information

No response

@mattmassicotte mattmassicotte added feature A feature request or implementation triage needed This issue needs more specific labels labels Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A feature request or implementation triage needed This issue needs more specific labels
Projects
None yet
Development

No branches or pull requests

1 participant