Skip to content

[Concurrency] Infer protocol isolation from superclass requirements. #74607

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
Jun 21, 2024

Conversation

hborla
Copy link
Member

@hborla hborla commented Jun 21, 2024

Actor isolation on protocols was already inferred from inherited protocols, but we were missing inference from a required superclass.

Note that this is staged in behind the GlobalActorIsolatedTypesUsability upcoming feature, just like inference from refined protocols, because it's source breaking.

Resolves: #63473, rdar://127152935

Actor isolation on protocols was already inferred from inherited protocols,
but we were missing inference from a required superclass.
@hborla
Copy link
Member Author

hborla commented Jun 21, 2024

@swift-ci please smoke test

Copy link
Contributor

@ktoso ktoso left a comment

Choose a reason for hiding this comment

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

Looks good I think

@hborla hborla merged commit 678d41a into swiftlang:main Jun 21, 2024
3 checks passed
@hborla hborla deleted the isolation-from-superclass-requirement branch June 21, 2024 15:30
Copy link
Contributor

@slavapestov slavapestov left a comment

Choose a reason for hiding this comment

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

Is there any possibility of an infinite loop with the pointless but sometimes-written

protocol P : C {}
class C : P {}

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.

Protocol doesn't inherit @MainActor requirement from base class
4 participants