Skip to content

"nonisolated deinit" does not have back-deployment constraints #82584

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
merged 6 commits into from
Jun 28, 2025

Conversation

DougGregor
Copy link
Member

Fixes rdar://150484159

When the default isolation is main-actor, don't infer @mainactor
for a type that conforms to a protocol P in its primary definition when
P inherits from Sendable. Such types should remain non-isolated
because they're highly unlikely to be able to implement the P
conformance (which cannot be isolated).

Put this feature behind a new experimental flag,
SendableProhibitsMainActorInference.

Implements rdar://151029300
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor
Copy link
Member Author

@swift-ci please smoke test Windows

@DougGregor DougGregor merged commit 1d5fecb into swiftlang:main Jun 28, 2025
3 checks passed
@DougGregor DougGregor deleted the nonisolated-deinit-availability branch June 28, 2025 15:07
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.

1 participant