Skip to content

[region-isolation] Add a test showing that we do not infer nonisolated(unsafe) onto named closures. #81785

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

Conversation

gottesmm
Copy link
Contributor

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.

…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.
@gottesmm gottesmm requested a review from xedin May 27, 2025 16:55
@gottesmm gottesmm marked this pull request as ready for review May 27, 2025 16:55
@gottesmm gottesmm requested a review from ktoso as a code owner May 27, 2025 16:55
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm gottesmm enabled auto-merge May 27, 2025 16:55
@gottesmm gottesmm merged commit 6545a00 into swiftlang:main May 27, 2025
3 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.

2 participants