Skip to content

Kotlin: wrap if expressions in K.StatementExpression - #8746

Merged
greg-at-moderne merged 1 commit into
mainfrom
greg-kotlin-if-parsing
Sep 3, 2026
Merged

Kotlin: wrap if expressions in K.StatementExpression#8746
greg-at-moderne merged 1 commit into
mainfrom
greg-kotlin-if-parsing

Conversation

@greg-at-moderne

@greg-at-moderne greg-at-moderne commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

What's changed?

Changing how if expressions are parsed for Kotlin. Wrapping them with K.StatementExpression.

What's your motivation?

Otherwise class cast exceptions happen as recipes don't expect a statement (J.If) in place of an expression.

@greg-at-moderne greg-at-moderne self-assigned this Sep 2, 2026
@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Sep 2, 2026
@greg-at-moderne
greg-at-moderne marked this pull request as ready for review September 3, 2026 09:09
@greg-at-moderne
greg-at-moderne merged commit 6559714 into main Sep 3, 2026
1 check passed
@greg-at-moderne
greg-at-moderne deleted the greg-kotlin-if-parsing branch September 3, 2026 09:09
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Sep 3, 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