Skip to content

Add empty parens to var-to-function renames. #4979

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

jrose-apple
Copy link
Contributor

  • Explanation: We have a fix-it for when a declaration is renamed, but that fix-it is mostly geared towards renames of functions to functions or properties to properties. When a property is replaced by a function, it would be nice™ if the fix-it added parens to call it. This change does that.
  • Scope: Only affects diagnostics for deprecated or unavailable entities.
  • Issue: SR-1649
  • Reviewed by: @nkcsgexi and @harlanhaskins
  • Risk: Low.
  • Testing: Added existing compiler regression tests (most from an earlier version of this change).

This time, propagate the decl marked deprecated or unavailable through
to the fix-it, so we can be sure it's a var.

https://bugs.swift.org/browse/SR-1649
(cherry picked from commit d89c232)
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@tkremenek tkremenek merged commit 3963ec7 into swiftlang:swift-3.0-branch Sep 23, 2016
@jrose-apple jrose-apple deleted the swift-3-var-to-function-parens branch September 23, 2016 23: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