Skip to content

Scala: parse classOf[Something] as MethodInvocation#7857

Merged
greg-at-moderne merged 1 commit into
mainfrom
greg-classof-string-parse
Jun 1, 2026
Merged

Scala: parse classOf[Something] as MethodInvocation#7857
greg-at-moderne merged 1 commit into
mainfrom
greg-classof-string-parse

Conversation

@greg-at-moderne
Copy link
Copy Markdown
Contributor

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

What's changed?

Parsing Scala's classOf[String] as MethodInvocation, similar to Java's String.class being parsed as FieldAccess.

What's your motivation?

Currently it's parsed into a single J.Identifier, which doesn't make sense.

@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Jun 1, 2026
@greg-at-moderne greg-at-moderne marked this pull request as ready for review June 1, 2026 14:01
@greg-at-moderne greg-at-moderne merged commit 2a5fdea into main Jun 1, 2026
1 check passed
@greg-at-moderne greg-at-moderne deleted the greg-classof-string-parse branch June 1, 2026 14:01
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Jun 1, 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