Skip to content

False positive unused private class with type parameter #23694

@eejbyfeldt

Description

@eejbyfeldt

Compiler version

3.7.2

Minimized code

trait A {
  def get: Any = new A.C {}
}

object A {
  private class C[T]
}

Output

-- [E198] Unused Symbol Warning: unused_class.scala:6:16 -
6 |  private class C[T]
  |                ^
  |                unused private member
1 warning found

Expectation

Compiles without warnings.

Metadata

Metadata

Assignees

Labels

itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" label

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions