Skip to content

Don't warn using val #22662

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
som-snytt opened this issue Feb 25, 2025 · 0 comments · Fixed by #22664
Closed

Don't warn using val #22662

som-snytt opened this issue Feb 25, 2025 · 0 comments · Fixed by #22664
Assignees
Labels
area:linting Linting warnings enabled with -W or -Xlint itype:bug
Milestone

Comments

@som-snytt
Copy link
Contributor

Compiler version

3.7

Minimized code

-- [E198] Unused Symbol Warning: case-using.scala:4:31 -------------------------
4 |case class K(i: Int)(using val ctx: Ctx)
  |                               ^^^
  |                               unused implicit parameter
-- [E198] Unused Symbol Warning: case-using.scala:5:30 -------------------------
5 |class C(val i: Int)(using val ctx: Ctx)
  |                              ^^^
  |                              unused implicit parameter
2 warnings found

Output

// TODO add output here

Expectation

Don't warn for public member; it happens to be supplied implicitly.

@som-snytt som-snytt added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label area:linting Linting warnings enabled with -W or -Xlint and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Feb 25, 2025
@som-snytt som-snytt self-assigned this Feb 25, 2025
@sjrd sjrd closed this as completed in 8b04ba8 Mar 6, 2025
@WojciechMazur WojciechMazur added this to the 3.7.0 milestone Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:linting Linting warnings enabled with -W or -Xlint itype:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants