compiler warnings - Warn about name shadowing in scala 2.11 -
i'm using sbt build project , have in build.scala:
scalacoptions ++= seq("-unchecked", "-deprecation", "-feature", "-xfatal-warnings") how can configure project warn on name/variable shadowing? i've browsed source here , here, don't see i'm looking among many options. comment on this old question mentions flag -ywarn-shadowing doesn't seem exist.
as indicated in related question, start exploring -x. tried -xlint:help , yields settings shadowing:
information:scalac: enable or disable specific warnings adapted-args warn if argument list modified match receiver. nullary-unit warn when nullary methods return unit. inaccessible warn inaccessible types in method signatures. nullary-override warn when non-nullary `def f()' overrides nullary `def f'. infer-any warn when type argument inferred `any`. missing-interpolator string literal appears missing interpolator id. doc-detached scaladoc comment appears detached element. private-shadow private field (or class parameter) shadows superclass field. type-parameter-shadow local type parameter shadows type in scope. poly-implicit-overload parameterized overloaded implicit methods not visible view bounds. option-implicit option.apply used implicit view. delayedinit-select selecting member of delayedinit. by-name-right-associative by-name parameter of right associative operator. package-object-classes class or object defined in package object. unsound-match pattern match may not typesafe. stars-align pattern sequence wildcard must align sequence component. probably -xlint:private-shadow want?
Comments
Post a Comment