Skip to content

[move-keyword] Make sure we error correctly on f(_move y, &y) and f(&y, _move y) #60614

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

This was actually crashing on the inout use since I at some point changed the
isReinit code to use a more general routine to determine that which was
incorrect. Instead, this is actually trying to recognize reinits that we know
how to change into a non-reinit form (e.x.: store [assign] -> store [init]).
Since the inout use was not handled by the convert reinit to init code, we
crashed.

Now we get the correct behavior since the access to y always occurs /before/ the
formal evaluation of the inout.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

…y, _move y)

This was actually crashing on the inout use since I at some point changed the
isReinit code to use a more general routine to determine that which was
incorrect. Instead, this is actually trying to recognize reinits that we know
how to change into a non-reinit form (e.x.: store [assign] -> store [init]).
Since the inout use was not handled by the convert reinit to init code, we
crashed.

Now we get the correct behavior since the access to y always occurs /before/ the
formal evaluation of the inout.
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm gottesmm merged commit 64cfb11 into swiftlang:main Aug 21, 2022
@gottesmm gottesmm deleted the pr-8b6f8f63b85eace0268577bdd44c8bfe46cc810b branch August 21, 2022 04:37
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