Skip to content

Go: function expressions wrapped with StatementExpression#7250

Closed
greg-at-moderne wants to merge 1 commit intomainfrom
greg-go-statement-expr
Closed

Go: function expressions wrapped with StatementExpression#7250
greg-at-moderne wants to merge 1 commit intomainfrom
greg-go-statement-expr

Conversation

@greg-at-moderne
Copy link
Copy Markdown
Contributor

What's changed?

Changing how functions as expression are parsed.
Since they are parsed as J.MethodDeclaration, they need to be wrapped into StatementExpressions.

What's your motivation?

Otherwise it fails during RPC with messages like:

ClassCastException: J.MethodDeclaration cannot be cast to Expression

@greg-at-moderne
Copy link
Copy Markdown
Contributor Author

Superseded by #7261.

@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant