Skip to content

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

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 2 commits into from
Jul 26, 2025

Conversation

tgodzik
Copy link

@tgodzik tgodzik commented Jul 24, 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 24, 2025 14:49
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]
Base automatically changed from backport-lts-3.3-23491 to lts-3.3 July 26, 2025 08:21
@tgodzik
Copy link
Author

tgodzik commented Jul 26, 2025

No regressions detected in the community build up to backport-lts-3.3-23126.

Reference

@tgodzik tgodzik merged commit 8c6915c into lts-3.3 Jul 26, 2025
22 checks passed
@tgodzik tgodzik deleted the backport-lts-3.3-23497 branch July 26, 2025 08:21
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