-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
area:lintingLinting warnings enabled with -W or -XlintLinting warnings enabled with -W or -Xlintitype:bug
Description
Compiler version
3.7.3
Minimized example
object Test {
private case class Unused()
}Output Error/Warning message
$ scala-cli compile -S 3.3.7 -Wall unused_private_class.scalaWhy this Error/Warning was not helpful
This is no warning about the class Unused being unused.
Suggested improvement
By dropping the case modified the compiler instead warns on it being unused
$ scala-cli compile -S 3.3.7 -Wall unused_private_class.scala
Compiling project (Scala 3.3.7, JVM (21))
[warn] ./unused_private_class.scala:2:17
[warn] unused private member
[warn] private class Unused()
[warn] ^^^^^^
Compiled project (Scala 3.3.7, JVM (21))
It could be made more helpful by also warn on case classes.
Metadata
Metadata
Assignees
Labels
area:lintingLinting warnings enabled with -W or -XlintLinting warnings enabled with -W or -Xlintitype:bug