Skip to content

Scala: model partial functions with short match syntax#7404

Merged
greg-at-moderne merged 1 commit intomainfrom
greg-partial-fn-literal
Apr 17, 2026
Merged

Scala: model partial functions with short match syntax#7404
greg-at-moderne merged 1 commit intomainfrom
greg-partial-fn-literal

Conversation

@greg-at-moderne
Copy link
Copy Markdown
Contributor

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

What's changed?

Fixing how Scala partial function literals with short match syntax are parsed, e.g.

                val f: Int => Int = {
                  case 1 => 1
                }

Squeezing them into a J.Lambda, but with a marker to denote the short syntax is used.

What's your motivation?

Currently it fails idempotency expectation.

@greg-at-moderne greg-at-moderne self-assigned this Apr 17, 2026
@github-project-automation github-project-automation bot moved this to In Progress in OpenRewrite Apr 17, 2026
@greg-at-moderne greg-at-moderne changed the title Scala: M=model partial functions with short match syntax Scala: model partial functions with short match syntax Apr 17, 2026
@greg-at-moderne greg-at-moderne marked this pull request as ready for review April 17, 2026 08:54
@greg-at-moderne greg-at-moderne merged commit d9edb83 into main Apr 17, 2026
1 check passed
@greg-at-moderne greg-at-moderne deleted the greg-partial-fn-literal branch April 17, 2026 08:54
@github-project-automation github-project-automation bot moved this from In Progress to Done in OpenRewrite Apr 17, 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