Skip to content

Backport "Use result of lambda type of implicit in CheckUnused" to 3.3 LTS #504

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

Closed
wants to merge 2 commits into from

Conversation

tgodzik
Copy link

@tgodzik tgodzik commented Jul 23, 2025

Backports scala#23497 to the 3.3.7.

PR submitted by the release tooling.
[skip ci]

som-snytt and others added 2 commits July 23, 2025 15:09
Fixes scala#23494

When inspecting unused implicit parameters, the check skips parameters
which are "marker traits". It tests for any members of the type (or its
upper bound) which are not "universal members". This commit uses the
`resultType` to avoid an error
```
invalid new prefix
```
while computing members where the type is a `LambdaType`.

A future improvement would be not to request `allMembers`, since the
check only needs to find one that is not universal.

The necessitating change was
scala@2e4bc0a.
Fixes scala#23494 

When inspecting unused implicit parameters, the check skips parameters
which are "marker traits". It tests for any members of the type (or its
upper bound) which are not "universal members". This commit uses the
`resultType` to avoid an error
```
invalid new prefix
```
while computing members where the type is a `LambdaType`.

A future improvement would be not to request `allMembers`, since the
check only needs to find one that is not universal.

The necessitating change was
scala@2e4bc0a.
[Cherry-picked a5e15ab][modified]
@tgodzik tgodzik closed this Jul 24, 2025
@tgodzik tgodzik deleted the backport-lts-3.3-23497 branch July 24, 2025 12:43
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.

2 participants