-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:lintingLinting warnings enabled with -W or -XlintLinting warnings enabled with -W or -Xlintitype:enhancement
Description
Compiler version
3.7.2
Minimized code
trait Test {
def incr(): Unit
}
object Test {
val test = new Test {
var position: Int = 0
def incr(): Unit = { position += 1 }
}
}
Output
[warn] -- [E198] Unused Symbol Warning: Test.scala:9:8
[warn] 9 | var position: Int = 0
[warn] | ^^^^^^^^^^
[warn] | unused private member
Expectation
Compiles without warnings.
Metadata
Metadata
Assignees
Labels
area:lintingLinting warnings enabled with -W or -XlintLinting warnings enabled with -W or -Xlintitype:enhancement