Skip to content

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
Member

@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

Development

Successfully merging this pull request may close these issues.

InstanceOfPatternMatch can produce name clashes InstanceOfPatternMatch declares variable with conflicting name

3 participants