Skip to content

Don't warn using val #22662

Closed
Closed
@som-snytt

Description

@som-snytt

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.

Metadata

Metadata

Assignees

Labels

area:lintingLinting warnings enabled with -W or -Xlintitype:bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions