Skip to content

Allow Kotlin method invocation type to be considered valid if null#6409

Closed
greg-dennis wants to merge 1 commit intoopenrewrite:mainfrom
greg-dennis:main
Closed

Allow Kotlin method invocation type to be considered valid if null#6409
greg-dennis wants to merge 1 commit intoopenrewrite:mainfrom
greg-dennis:main

Conversation

@greg-dennis
Copy link
Copy Markdown

@greg-dennis greg-dennis commented Dec 10, 2025

What's changed?

This allows the type of a Kotlin MethodInvocation to be considered valid if null, as already anticipated by the by the KotlinTreeParseVisitor.

What's your motivation?

Anything in particular you'd like reviewers to focus on?

Anyone you would like to review specifically?

@timtebeek has context from Slack
@Laurens-W

Have you considered any alternatives or workarounds?

I tried to find a way to force the parser to resolve the type, but the issue appears to be deep in the bowels of the Jetbrains FIR.

Any additional context

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@timtebeek
Copy link
Copy Markdown
Member

As discussed on openrewrite/rewrite-testing-frameworks#871 the preferred way of ignoring some type validation issues is through .typeValidationOptions(.... Let's close this effort as it's aimed at working around rather than fixing the underlying issue.

@timtebeek timtebeek closed this Dec 11, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in OpenRewrite Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants