Skip to content

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

Merged
merged 3 commits into from
May 1, 2025

Conversation

arodionov
Copy link
Contributor

@arodionov arodionov commented Apr 30, 2025

In addition to the Cursor scope, added the enclosing `J.If` scope for searching conflicting variable names.

Fix #334
@arodionov arodionov self-assigned this Apr 30, 2025
@github-project-automation github-project-automation bot moved this to In Progress in OpenRewrite Apr 30, 2025
Copy link
Contributor

@github-actions github-actions bot left a 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

@arodionov arodionov marked this pull request as ready for review April 30, 2025 16:14
@arodionov arodionov changed the title Fix clashing variable names generated by InstanceOfPatternMatch Fix clashing variable names generated by InstanceOfPatternMatch Apr 30, 2025
Copy link
Contributor

@github-actions github-actions bot left a 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

Copy link
Contributor

@github-actions github-actions bot left a 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

Copy link
Contributor

@timtebeek timtebeek left a 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.

@github-project-automation github-project-automation bot moved this from In Progress to Ready to Review in OpenRewrite May 1, 2025
@timtebeek timtebeek merged commit bd184b7 into main May 1, 2025
2 checks passed
@timtebeek timtebeek deleted the fix-334 branch May 1, 2025 12:32
@github-project-automation github-project-automation bot moved this from Ready to Review to Done in OpenRewrite May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
2 participants