Skip to content

Permit redeclaration of superclass's Sendable-ness #41306

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 1 commit into from
Feb 10, 2022

Conversation

beccadax
Copy link
Contributor

A recent change to Sendable conformance handling resulted in subclasses of global-actor-confined classes being rejected if they explicitly declared a conformance to Sendable.

This behavior is technically correct because actor-isolated types are implicitly Sendable, but the source compatibility regression was not desirable. We are also considering requiring subclasses to explicitly repeat their superclass's Sendable conformance, so it makes sense to allow these redundant conformances in the general case to ease that potential transition.

Fixes rdar://88700507.

A recent change to `Sendable` conformance handling resulted in subclasses of global-actor-confined classes being rejected if they explicitly declared a conformance to `Sendable`.

This behavior is technically correct because actor-isolated types are implicitly `Sendable`, but the source compatibility regression was not desirable. We are also considering requiring subclasses to explicitly repeat their superclass's `Sendable` conformance, so it makes sense to allow these redundant conformances in the general case to ease that potential transition.

Fixes rdar://88700507.
@beccadax beccadax requested a review from DougGregor February 10, 2022 00:04
@beccadax
Copy link
Contributor Author

@swift-ci please smoke test

@beccadax beccadax merged commit efd6c29 into swiftlang:main Feb 10, 2022
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