Skip to content

Local functions can capture "self" as isolated. #38009

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

@DougGregor DougGregor commented Jun 21, 2021

Explanation: Address a recent regression in actor-isolation checking that treated local functions within actor-isolated functions as non-isolated.
Scope: Only affects new code using actors and local functions.
Radar/SR Issue: rdar://79564012
Risk: Low.
Testing: PR testing and CI on main.
Original PR: #38010

This is a short-term fix to address a regression in actor-isolation
checking. A longer-term fix involves changing the way in which we
model actor isolation so that local functions can be stated to be
isolated to a particular capture, much like closures.

This subsumes my short-sighted fix for "defer".

Fixes rdar://79564012.
@DougGregor DougGregor requested a review from a team as a code owner June 21, 2021 20:26
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please nominate

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 82014d7

@DougGregor
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 82014d7

@DougGregor
Copy link
Member Author

@swift-ci please test macOS

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 82014d7

@DougGregor
Copy link
Member Author

@swift-ci please test macOS

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 82014d7

@DougGregor
Copy link
Member Author

@swift-ci please test macOS

@DougGregor
Copy link
Member Author

@swift-ci please test macOS

@DougGregor DougGregor merged commit 01d349c into swiftlang:release/5.5 Jun 24, 2021
@DougGregor DougGregor deleted the local-functions-isolated-self-5.5 branch June 24, 2021 16:14
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.5 labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants