Skip to content

Groovy: fix parsing of deconstructing assignment of existing variables#7535

Merged
greg-at-moderne merged 1 commit intomainfrom
greg-groovy-destructuring-existing-vars
Apr 30, 2026
Merged

Groovy: fix parsing of deconstructing assignment of existing variables#7535
greg-at-moderne merged 1 commit intomainfrom
greg-groovy-destructuring-existing-vars

Conversation

@greg-at-moderne
Copy link
Copy Markdown
Contributor

@greg-at-moderne greg-at-moderne commented Apr 30, 2026

What's changed?

Fixing Groovy parser way of handling of deconstructing assignment of existing variables. Previously only new variable declarations were handled.
e.g.

              def key = 'k'
              def elemAttrs = [:]
              (key, elemAttrs) = ['x', [:]]

What's your motivation?

Exceptions are thrown during parsing.

@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Apr 30, 2026
@greg-at-moderne greg-at-moderne marked this pull request as ready for review April 30, 2026 15:02
@greg-at-moderne greg-at-moderne merged commit 240bead into main Apr 30, 2026
1 check passed
@greg-at-moderne greg-at-moderne deleted the greg-groovy-destructuring-existing-vars branch April 30, 2026 15:02
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant