Skip to content

[4.0] Sema: Track writes through WritableKeyPaths for mutation warnings. #10328

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

jckarter
Copy link
Contributor

Explanation: We would erroneously flag a var as not being mutated if the only mutations were through WritableKeyPaths.

Scope: Annoying hard-to-dismiss warning incorrectly raised when using keypaths in common idioms

Issue: Fixes SR-5214 | rdar://problem/32599483

Risk: Low, small bug fix to a QoI diagnostic

Testing: CI, test case from Jira

Previously we would erroneously flag a `var` as not being mutated if the only mutations were through WritableKeyPaths. Fixes SR-5214 | rdar://problem/32599483.
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@jckarter jckarter requested a review from DougGregor June 16, 2017 19:54
@jckarter
Copy link
Contributor Author

@DougGregor Does this look good for 4.0?

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tkremenek tkremenek merged commit 4fd9846 into swiftlang:swift-4.0-branch Jun 17, 2017
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.

3 participants