Skip to content

[5.9] Fix Sendable checking for overrides, witnesses, and calls that involving sub typing or implicit conversions #66948

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

jturcotti and others added 5 commits June 26, 2023 22:12
…he past, both the results and parameters of overriding (resp. conforming) functions were checked for Sendability. This is overly restrictive. For safety, the parameters of the overridden (resp. requiring) function should be checked for Sendability and the results of the overriding (resp. conforming) should be checked. This commit implements that change.

(cherry picked from commit eb78da2)
Isolation checking for calls had two separate implementation places:
one that looked at the declaration being called (for member
declarations) and one that worked on the actual call expression. Unify
on the latter implementation, which is more general and has access to
the specific call arguments. Improve diagnostics here somewher so we
don't regress in that area.

This refactoring shouldn't change the actual semantics, but it makes
upcoming semantic changes easier.

(cherry picked from commit d78a5ed)
The move to perform all call checking that can cross concurrency
domains into one place dropped the specific logic for distributed
actor calls. Introduce that logic, cleaning it up to consistently use
the "known to be local" semantics needed for distributed actors.

(cherry picked from commit 740cd7b)
…te path

Remove the "old" path that diagnosed actor isolation and sendability
issues with some calls. It is now unused.

(cherry picked from commit 11dd80a)
…in a call

When checking for the sendability in a call, use the sendability of the
original argument expressions rather than the parameter type, looking
through any implicit conversions that might remove `Sendable`.

Fixes rdar://110763694 / FB12343467.

(cherry picked from commit 7c45c7d)
@DougGregor DougGregor requested a review from a team as a code owner June 27, 2023 05:32
@DougGregor
Copy link
Member Author

@swift-ci please test

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.

3 participants