Skip to content

[TypeChecker] Remove @_inheritActorContext effect from synchronous … #82157

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 12, 2025

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jun 10, 2025

…types

The compiler would previously accept use of @_inheritActorContext on a parameter with a synchronous function type which wasn't marked as @isolated(any). That is incorrect because in such cases the attribute has no effect and furthermore would prevent Sendable and isolation checking.

Uses like that are currently diagnosed by the type-checker but we need to go one step further and remove the effect in such case to prevent invalid uses.

Resolves: rdar://143581268

…types

The compiler would previously accept use of `@_inheritActorContext`
on a parameter with a synchronous function type which wasn't marked
as `@isolated(any)`. That is incorrect because in such cases the
attribute has no effect and furthermore would prevent Sendable
and isolation checking.

Uses like that are currently diagnosed by the type-checker but we
need to go one step further and remove the effect in such case to
prevent invalid uses.

Resolves: rdar://143581268
@xedin
Copy link
Contributor Author

xedin commented Jun 12, 2025

@swift-ci please test

@xedin xedin merged commit bbe1185 into swiftlang:main Jun 12, 2025
5 checks passed
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.

4 participants