-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Parser] Allow closures with custom attributes and capture lists. #37987
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
[Parser] Allow closures with custom attributes and capture lists. #37987
Conversation
The parsing of Swift 1.0 beta-1 array syntax (e.g., `Int [something]`) was preventing closures with both a custom attribute (e.g., `@MainActor) and a capture list from parsing correctly. Don't parse that syntax within custom attributes. Fixes rdar://77303587.
@swift-ci please test |
@swift-ci please nominate |
Build failed |
Build failed |
@swift-ci please test |
Build failed |
@swift-ci please test macOS |
Build failed |
@swift-ci please test macOS |
1 similar comment
@swift-ci please test macOS |
Build failed |
@swift-ci please test macOS |
Explanation: Parse closures with both a custom attribute (e.g.,
@MainActor
) and a capture list without complaining about Swift 1.0 beta 1 array type syntax.Scope: Affects new code making use of concurrency.
Radar/SR Issue: rdar://77303587
Risk: Low.
Testing: PR testing and CI on main.
Original PR: #37986