Skip to content

Dealias for unused param check #23256

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

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

Conversation

som-snytt
Copy link
Contributor

@som-snytt som-snytt commented May 23, 2025

Fixes #23250

The check for "unused implicit parameter" considers the type of the parameter, but it should dealias first.

In addition, take an abstract type as not warnable, unless it has an upper bound that is warnable (has non-universal members).

Note that isSingleton dealiases.

There was an ancient (OG) typo of & for && which has gone unfixed despite other edits. The right operand was always just an instanceof. Not sure if the previous idiom saves an opcode, but now it looks like other code nearby.

@som-snytt som-snytt force-pushed the issue/23250-warn-aliased-param-type branch from 047d302 to 17a1b3f Compare May 23, 2025 18:48
@som-snytt som-snytt marked this pull request as ready for review May 24, 2025 05:33
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.

False positive unused given in extensions when referring to type alias
1 participant