Skip to content

[6.2][rbi] Treat a partial_apply as nonisolated(unsafe) if all of its captures are nonisolated(unsafe). #82428

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

Draft
wants to merge 2 commits into
base: release/6.2
Choose a base branch
from

Conversation

gottesmm
Copy link
Contributor

[rbi] Treat a partial_apply as nonisolated(unsafe) if all of its captures are nonisolated(unsafe).

rdar://144111950
(cherry picked from commit 010443c)

gottesmm added 2 commits June 23, 2025 12:53
…ures are nonisolated(unsafe).

rdar://144111950
(cherry picked from commit 010443c)
…d(unsafe) onto named closures.

The semantics we want is for nonisolated(unsafe) to be inferred onto anonymous
closures. We already have that semantics since we do not look through move_value
[var_decl] or begin_borrow [var_decl]. So even though the underlying
partial_apply will be viewed as nonisolated(unsafe), we will not consider that
when determining the nonisolated(unsafe) for the begin_borrow or move_value that
defined the variable whose value is the partial_apply.

(cherry picked from commit 359eeec)
@gottesmm
Copy link
Contributor Author

@swift-ci test

1 similar comment
@gottesmm
Copy link
Contributor Author

@swift-ci 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.

1 participant