Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: Infer arg type properly when complex #7158

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tgodzik
Copy link
Contributor

@tgodzik tgodzik commented Jan 25, 2025

Fixes #6954

@tgodzik tgodzik force-pushed the infer-method-2 branch 3 times, most recently from 4330f04 to 1deaedd Compare January 26, 2025 11:38
@tgodzik tgodzik requested a review from kasiaMarek January 26, 2025 12:01
@@ -177,6 +178,33 @@ final class InferredMethodProvider(
} else None
}

private def inferArgType(arg: Tree): String = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't work for lambda expression with short syntax, like:

List(...).map(<<method>>)

right? But it also shouldn't call this method in such a case, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it will not be called in that case. This is strictly in cases where we want to calculate parameter types of the non existing function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inferred type in infer method code action should infer generics correctly
2 participants