-
Notifications
You must be signed in to change notification settings - Fork 10.5k
3.0: @autoclosure @escaping syntax #4052
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
3.0: @autoclosure @escaping syntax #4052
Conversation
Adds the preferred syntax for escaping autoclosures, which is @autoclosure @escaping. Deprecates @autoclosure(escaping), and provides fixits.
@NoEscape is now the default behavior, so deprecate it and offer a fixit.
@swift-ci please test |
Linux failure is infrastructural: |
@swift-ci please test linux |
1 similar comment
@swift-ci please test linux |
@slavapestov reviewed the original PR. Slava, if you have time, mind looking this one over? There should be no differences. |
|
||
if (isFunctionParam && attrs.has(TAK_noescape) && | ||
isDefaultNoEscapeContext(DC)) { | ||
// FIXME: diagnostic to tell user this is redundant and drop it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should still be addressed in master -- don't we already have a diagnostic?
Looks good to me. |
What's in this pull request?
3.0 version of #4031
Resolved bug number: (SR-1952)
Before merging this pull request to apple/swift repository:
Triggering Swift CI
The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:
Smoke Testing
A smoke test on macOS does the following:
device standard libraries are not built.
version of these tests are not run.
A smoke test on Linux does the following:
tests are not run.
Validation Testing
Lint Testing
Note: Only members of the Apple organization can trigger swift-ci.