Skip to content

Go: introduce Go.Return for multi-value returns#7936

Merged
greg-at-moderne merged 1 commit into
mainfrom
greg-go-rpc-receiver-multireturn
Jun 8, 2026
Merged

Go: introduce Go.Return for multi-value returns#7936
greg-at-moderne merged 1 commit into
mainfrom
greg-go-rpc-receiver-multireturn

Conversation

@greg-at-moderne

@greg-at-moderne greg-at-moderne commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

What's changed?

Introduce new LST element for Go: Go.Return / golang.Return.
1-arg and 0-arg returns continue to be parsed as J.Return / java.Return.

What's your motivation?

To properly map return statements with more than one expression, e.g.

return 0, nil

@greg-at-moderne greg-at-moderne self-assigned this Jun 8, 2026
@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Jun 8, 2026
@greg-at-moderne greg-at-moderne marked this pull request as ready for review June 8, 2026 12:30
@greg-at-moderne greg-at-moderne merged commit 22d2971 into main Jun 8, 2026
1 check passed
@greg-at-moderne greg-at-moderne deleted the greg-go-rpc-receiver-multireturn branch June 8, 2026 12:30
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Jun 8, 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