Skip to content

Allow a global-actor-isolated class to inherit from a nonisolated one. #38708

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

Conversation

DougGregor
Copy link
Member

@DougGregor DougGregor commented Jul 30, 2021

Explanation: In tightening up the semantic rules around data races for class inheritance (#38213), the Swift compiler started rejecting a common pattern that is actually safe: a main-actor-isolated subclass of a non-isolated class, causing a number of apps to be incorrectly rejected. Allow this inheritance pattern.
Scope: Affects Swift code using the new concurrency features.
Radar/SR Issue: rdar://80902604
Risk: Very low. This loosens up a recently-added restriction, accepting more Swift code that was accepted before.
Testing: PR testing and CI on main.
Original PR: #38707

@DougGregor DougGregor requested a review from a team as a code owner July 30, 2021 18:23
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please nominate

@DougGregor DougGregor merged commit 18a849e into swiftlang:release/5.5 Jul 31, 2021
@DougGregor DougGregor deleted the global-actor-isolated-inherits-nonisolated-5.5 branch July 31, 2021 04:38
@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.

3 participants