Skip to content

Conversation

som-snytt
Copy link
Contributor

@som-snytt som-snytt commented Aug 8, 2025

Fixes #23694

The selection in new A.C does not have a symbol when C[T] because the type is [T] =>> this.A.C[T].

Select node in `new p.C[T]` has a lambda type,
so the symbol `C` is found in its result type.
The TypeApply has a symbol which is the constructor of C.
Both trees are used to register `C` as used.
@som-snytt som-snytt force-pushed the issue/23694-unused-private branch from c48a60d to f49571b Compare September 18, 2025 23:46
@som-snytt som-snytt marked this pull request as ready for review September 18, 2025 23:48
@Gedochao Gedochao requested a review from tgodzik September 30, 2025 07:20
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!

@som-snytt som-snytt merged commit 28a4921 into scala:main Sep 30, 2025
50 checks passed
@som-snytt som-snytt deleted the issue/23694-unused-private branch September 30, 2025 17:00
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 private class with type parameter

2 participants