## Compiler version 3.7.2 ## Minimized code <!-- This code should be self contained, compilable (with possible failures) and as small as possible. Ideally, we should be able to just copy this code to a file and run `scalac` (and maybe `scala`) to reproduce the issue. If the code has external dependencies, please provide the Scala CLI directives (or SBT/other build tool configuration) that describe them. Also note that it's easier and faster for the maintenance team to address issues minimised to reproduce bugs without external dependencies. It's most convenient to also include `using` directives for the Scala version that demonstrates the problem, any compiler command-line options, as well as dependencies. An example is provided. It's also fine to paste the transcript of a REPL session. Note that some bugs may be specific to the REPL. --> ```scala trait A { def get: Any = new A.C {} } object A { private class C[T] } ``` ## Output ```scala -- [E198] Unused Symbol Warning: unused_class.scala:6:16 - 6 | private class C[T] | ^ | unused private member 1 warning found ``` ## Expectation Compiles without warnings.