Skip to content

fix: simplify infer type for apply #23434

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

Merged
merged 1 commit into from
Jun 30, 2025
Merged

Conversation

kasiaMarek
Copy link
Member

@kasiaMarek kasiaMarek commented Jun 26, 2025

fixes: scalameta/metals#7538
fixes: scalameta/metals#7564
fixes: scalameta/metals#7567

I made the change, so infer type would reuse signature help. Actually there was a way simpler way to do this.

@kasiaMarek kasiaMarek force-pushed the infer-type-for-apply branch from 3dd303b to 44366a0 Compare June 27, 2025 13:26
@kasiaMarek kasiaMarek requested a review from tgodzik June 30, 2025 07:26
@kasiaMarek kasiaMarek changed the title fix: use signature help to infer type for apply fix: simplify infer type for apply Jun 30, 2025
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

LGTM!

yield tpe
case Some(tpe) => Some(tpe)
case _ => None
val idx = app.args.indexWhere(_.span.contains(span))
Copy link
Contributor

Choose a reason for hiding this comment

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

Och wow, that is much simpler!

@tgodzik tgodzik merged commit 5f50490 into scala:main Jun 30, 2025
29 checks passed
@TomasMikula
Copy link
Contributor

Thanks, looking forward to it being released.

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