diff options
author | Som Snytt <som.snytt@gmail.com> | 2014-07-16 11:01:31 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2014-07-16 23:52:27 -0700 |
commit | f81ec8d1f6481ddacfb27e743c6c58961e765f0e (patch) | |
tree | 95becbb83f676c4044aca1239916464279c16820 /test/files/neg | |
parent | 04cb634ec4564c6ee3bd34c3cef899537c3787ba (diff) | |
download | scala-f81ec8d1f6481ddacfb27e743c6c58961e765f0e.tar.gz scala-f81ec8d1f6481ddacfb27e743c6c58961e765f0e.tar.bz2 scala-f81ec8d1f6481ddacfb27e743c6c58961e765f0e.zip |
SI-8525 Clarify usage of -Xlint:_,flag
Also clarify usage of -Xlint flag.
Align more with javac -Xlint:all,-flag,flag where once a flag is
explicitly enabled it cannot be disabled, but where the wildcard
is a backstop only. (There is no all option yet here.)
-Xlint and -Xlint:_ just set a flag which is consulted by any
unset lint warning.
Xlint warnings consult the state of Xlint when they are unset.
Individual -Ywarn-ings do not.
Other warnings are explicitly set to false. They can only be
enabled programmatically.
Some tests are corrected. Also, option order is no longer
significant, see the unit test.
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t8610-arg.check | 14 | ||||
-rw-r--r-- | test/files/neg/t8610-arg.flags | 2 |
2 files changed, 2 insertions, 14 deletions
diff --git a/test/files/neg/t8610-arg.check b/test/files/neg/t8610-arg.check index ea2805508d..d6fe207119 100644 --- a/test/files/neg/t8610-arg.check +++ b/test/files/neg/t8610-arg.check @@ -1,18 +1,6 @@ -t8610-arg.scala:5: warning: possible missing interpolator: detected interpolated identifier `$name` - def x = "Hi, $name" // missing interp - ^ -t8610-arg.scala:7: warning: Adapting argument list by creating a 2-tuple: this may not be what you want. - signature: X.f(p: (Int, Int)): Int - given arguments: 3, 4 - after adaptation: X.f((3, 4): (Int, Int)) - def g = f(3, 4) // adapted - ^ -t8610-arg.scala:9: warning: private[this] value name in class X shadows mutable name inherited from class Named. Changes to name will not be visible within class X - you may want to give them distinct names. - override def toString = name // shadowing mutable var name - ^ t8610-arg.scala:8: warning: side-effecting nullary methods are discouraged: suggest defining as `def u()` instead def u: Unit = () // unitarian universalist ^ error: No warnings can be incurred under -Xfatal-warnings. -four warnings found +one warning found one error found diff --git a/test/files/neg/t8610-arg.flags b/test/files/neg/t8610-arg.flags index f8867a7b4e..f331ba9383 100644 --- a/test/files/neg/t8610-arg.flags +++ b/test/files/neg/t8610-arg.flags @@ -1 +1 @@ --Xfatal-warnings -Xlint warn-nullary-unit +-Xfatal-warnings -Xlint nullary-unit |