Skip to content
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

SuggestedFixes.renameMethodInvocation renames parameters with names matching the method #1451

Closed
carterkozak opened this issue Dec 16, 2019 · 2 comments

Comments

@carterkozak
Copy link
Contributor

ATTENTION! Please read and follow:

Description of the problem / feature request:

SuggestedFixes.renameMethodInvocation(tree, "updated", state) results in:

- obj.foo(bar, foo);
+ obj.foo(bar, updated);

Feature requests: what underlying problem are you trying to solve with this feature?

See above, methods are rewritten incorrectly.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

See above example.

What version of Error Prone are you using?

2.3.4

Have you found anything relevant by searching the web?

no.

carterkozak added a commit to carterkozak/error-prone that referenced this issue Dec 16, 2019
… params

`renameMethodInvocation` tracks paren depth in order to avoid
erroneously renaming parameter identifiers instead of the method.
@graememorgan
Copy link
Member

Thanks for the report. Sent out a fix internally.

netdpb pushed a commit that referenced this issue Jan 6, 2020
…in its blast radius.

Fixes external #1451

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=287828341
netdpb pushed a commit that referenced this issue Jan 6, 2020
…in its blast radius.

Fixes external #1451

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=287828341
kmclarnon pushed a commit to HubSpot/error-prone that referenced this issue Feb 19, 2020
…in its blast radius.

Fixes external google#1451

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=287828341
@cushon
Copy link
Collaborator

cushon commented May 15, 2020

This was fixed by b7f7883.

@cushon cushon closed this as completed May 15, 2020
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

No branches or pull requests

3 participants