-
Notifications
You must be signed in to change notification settings - Fork 70
Fix clashing variable names generated by InstanceOfPatternMatch
#538
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
In addition to the Cursor scope, added the enclosing `J.If` scope for searching conflicting variable names. Fix #334
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions could not be made:
- src/main/resources/META-INF/rewrite/examples.yml
- lines 634-633
- lines 679-695
- lines 1228-1247
- lines 1280-1279
- lines 2309-2308
- lines 2324-2336
- lines 3442-3453
- lines 3467-3472
InstanceOfPatternMatch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions could not be made:
- src/main/resources/META-INF/rewrite/examples.yml
- lines 634-633
- lines 679-695
- lines 1228-1247
- lines 1280-1279
- lines 2309-2308
- lines 2324-2336
- lines 2773-2772
- lines 2792-2803
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions could not be made:
- src/main/resources/META-INF/rewrite/examples.yml
- lines 480-483
- lines 497-496
- lines 634-633
- lines 679-695
- lines 1228-1247
- lines 1280-1279
- lines 2309-2308
- lines 2324-2336
- lines 2773-2772
- lines 2792-2803
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see these cleared out; I think there might still be an issue with a triple nested if
, but since this is already an improvement for a common case I propose we merge as is, and can address any other cases if reported.
In addition to the
cursor
scope, added the enclosingJ.If
scope for searching conflicting variable names.InstanceOfPatternMatch
declares variable with conflicting name #334VariableNameUtils#generateVariableName()
should consider following statements rewrite#2776