Skip to content

Exclude Selectable from unused member warning #23323

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
som-snytt opened this issue Jun 6, 2025 · 1 comment · May be fixed by #23325
Open

Exclude Selectable from unused member warning #23323

som-snytt opened this issue Jun 6, 2025 · 1 comment · May be fixed by #23325

Comments

@som-snytt
Copy link
Contributor

Follow up #22729 (comment)

Discussed in #23322

Originally posted by spavikevik June 5, 2025
We've been using Selectable extensively for fixtures in tests like this:

val f = new Selectable {
  val userId = Some("...")
}

But updating to Scala 3.7.x we are seeing a bunch of unused private member warnings, presumably because of #22729. Is this going to be a permanent limitation from Scala 3.7.x on? And if so, what would be the recommended way to fix the warnings?

Or can this be addressed in a subsequent release?

@som-snytt
Copy link
Contributor Author

The existing check used an explicit refinement to "silence" the warning for a member of an anonymous class.

The PR uses the inferred refinement for a Selectable for the same purpose.

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 a pull request may close this issue.

1 participant