Skip to content

Conversation

gottesmm
Copy link
Contributor

The logic here got confused over time. This simplifies the logic and ensures that we do not send a value if it is in the same isolation domain as the callee.

The one interesting side effect of this is that in a few tests, due to the logic being confused, we were emitting use-after-send errors for global actor isolated values that were passed to a function that was global actor isolated to the same actor and then used later locally. The error was sending 'X'-isolated a to 'X'-isolated function causes race against nonisolated local uses. In truth, this error is misleading and the only error that we should be emitting in such a case is the error about moving an isolated value into a non-isolated context (which we already emit).

rdar://132932382

…isolated value to a callee that is isolated ot the same actor is not considered a send.

The logic here got confused over time. This simplifies the logic and ensures
that we do not send a value if it is in the same isolation domain as the callee.

The one interesting side effect of this is that in a few tests, due to the logic
being confused, we were emitting use-after-send errors for global actor isolated
values that were passed to a function that was global actor isolated to the same
actor and then used later locally. The error was sending 'X'-isolated a to
'X'-isolated function causes race against nonisolated local uses. In truth, this
error is misleading and the only error that we should be emitting in such a case
is the error about moving an isolated value into a non-isolated context (which
we already emit).

rdar://132932382
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm
Copy link
Contributor Author

@swift-ci smoke test linux platform

@gottesmm gottesmm merged commit c72e57e into swiftlang:main Apr 21, 2025
3 checks passed
@gottesmm gottesmm deleted the pr-52ba504b4ba7185b4e3f34ed03b36721f4ad3d82 branch April 21, 2025 17:09
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