Skip to content

6.2: [MoveOnly] Fix consume of addr with mutated field. #81544

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

Conversation

nate-chandler
Copy link
Contributor

Explanation: Don't emit diagnostic when consuming an address whose field is passed inout.

The checker bails out when seeing an apply use of a field. That doesn't make sense when the apply takes the field inout. Narrow the condition under which it bails out to exclude inout operands.
Scope: Affects consume checking.
Issue: rdar://139666145
Original PR: #81541
Risk: Low.
Testing: Added test.
Reviewer: Andrew Trick ( @atrick )

Don't fail out of use visitation when encountering an apply which uses a
field of the value as an inout parameter.

rdar://139666145
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler nate-chandler marked this pull request as ready for review May 16, 2025 13:55
@nate-chandler nate-chandler requested a review from a team as a code owner May 16, 2025 13:55
@nate-chandler nate-chandler enabled auto-merge May 16, 2025 13:55
@nate-chandler
Copy link
Contributor Author

@swift-ci please test macos platform

@nate-chandler nate-chandler merged commit 968b82e into swiftlang:release/6.2 May 16, 2025
5 checks passed
@nate-chandler nate-chandler deleted the cherrypick/release/6.2/rdar139666145 branch May 20, 2025 17:59
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