Skip to content

[region-isolation] Implement support for 'inout sending' diagnostics. #74919

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

@gottesmm gottesmm commented Jul 2, 2024

rdar://126303739

gottesmm added 3 commits July 2, 2024 16:21
…so we can attach a Kind and propagate it.

The reason why I am doing this is that I am adding support for failing to
reinitialize an inout sending parameter that was transferred. To make it really
easy to do I am just going to explicitly represent this on the RequireInst and
let the decision on what diagnostic to be done to be represented in the
pseudo-IR instead of trying to just infer it straight from the type of require
inst. This keeps all of the logic in the same place and attempts to keep the
diagnostic emitter not use logic and instead just emit.

This is NFC so I can make sure that things work before adding the additional code.
Specifically:

1. We error now if one transfers an 'inout sending' parameter and does not
reinitialize it before the end of the function.

2. We error now if one merges an 'inout sending' parameter into an actor
isolated region and do not reinitialize it with a non-actor isolated value
before the end of the function.

rdar://126303739
@gottesmm
Copy link
Contributor Author

gottesmm commented Jul 2, 2024

@swift-ci smoke test

@gottesmm gottesmm enabled auto-merge July 2, 2024 23:24
@gottesmm gottesmm merged commit c20abe5 into swiftlang:main Jul 3, 2024
3 checks passed
@gottesmm gottesmm deleted the pr-d8b24a45ff257893c8172491f11a617fc00d5589 branch July 3, 2024 03:45
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