Skip to content

[Concurrency] Fix checking of captures in concurrent closures. #35798

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

Merged

Conversation

DougGregor
Copy link
Member

inout expressions can occur as children of "load" expressions, so
ensure that we (1) treat them as loads, semantically, and (2) don't
visit them multiple times.

inout expressions can occur as children of "load" expressions, so
ensure that we (1) treat them as loads, semantically, and (2) don't
visit them multiple times.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

// xpected-note @-14 {{capturing use}}
// xpected-note @-14 {{capturing use}}
i.i.addOne() // expected-warning {{'i' mutated after capture by concurrent closure}}
// expected-note @-14 {{variable defined here}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DougGregor Thanks for updating this test!

@DougGregor DougGregor merged commit 44f6214 into swiftlang:main Feb 6, 2021
@DougGregor DougGregor deleted the capture-var-in-concurrent-closure branch February 6, 2021 04:10
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

Successfully merging this pull request may close these issues.

2 participants