-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
scala/scala
#10756Description
Reproduction steps
Scala version: 2.13.13
object Bar extends Cloneable {
def f: Unit = {}
}$ scalac Test.scala -Xlint -Wconf:any:error
Test.scala:1: warning: object Bar should not extend Cloneable.
object Bar extends Cloneable {
^
Test.scala:2: error: side-effecting nullary methods are discouraged: suggest defining as `def f()` instead [quickfixable]
Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=lint-nullary-unit, site=Bar
def f: Unit = {}
^
1 warning
1 error
$ scalac Test.scala -Xlint -Wconf:any:silent
Test.scala:1: warning: object Bar should not extend Cloneable.
object Bar extends Cloneable {
^
1 warningProblem
-Xlint:cloneable level isn't changed by -Wconf:any settings, whereas -Xlint:nullary-unit and every other lint setting I've tested is