Skip to content

[4.2] migrator: handle changed parameter declarations by introducing bridging local variables. #17894

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
merged 1 commit into from
Jul 12, 2018

Conversation

nkcsgexi
Copy link
Contributor

Explanation: When users override a SDK function whose parameter types have been changed,
we should introduce a local variable in the body of the function definition
to shadow the changed parameter. Also, a proper conversion function should
be applied to bridge the parameter to the local variable.

Scope: Swift 4.2 migrator

Issue: rdar://problem/41828411

Risk: Low

Testing: Added regression tests; manual tests using swift-migrate-test

Reviewed by: Nathan Hawes

…ng local variables.

When users override a SDK function whose parameter types have been changed,
we should introduce a local variable in the body of the function definition
to shadow the changed parameter. Also, a proper conversion function should
be applied to bridge the parameter to the local variable.

rdar://41828411
@nkcsgexi
Copy link
Contributor Author

@swift-ci please test

@nkcsgexi nkcsgexi merged commit 8297d75 into swiftlang:swift-4.2-branch Jul 12, 2018
@nkcsgexi nkcsgexi deleted the 41828411-4.2 branch July 12, 2018 02:38
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