diff options
author | Som Snytt <som.snytt@gmail.com> | 2014-07-01 08:21:07 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2014-07-10 09:27:51 -0700 |
commit | 3b89c168b4926139f7295183fdc1903f6f553798 (patch) | |
tree | 640f0672a1deadf6d3b7e57383be6432165a551f /test/files/neg | |
parent | 44855dcd3c2e19d5dbaf01b2165ea8dc9fb287d3 (diff) | |
download | scala-3b89c168b4926139f7295183fdc1903f6f553798.tar.gz scala-3b89c168b4926139f7295183fdc1903f6f553798.tar.bz2 scala-3b89c168b4926139f7295183fdc1903f6f553798.zip |
SI-8525 No anonymous lint
Turn anonymous references to `settings.lint` into named settings.
After that, trust to Adriaan to make them filterable.
There are a few remaining top-level -Y lint warnings that are
deprecated.
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t4851.flags | 2 | ||||
-rw-r--r-- | test/files/neg/t8525.check | 11 | ||||
-rw-r--r-- | test/files/neg/t8525.flags | 2 | ||||
-rw-r--r-- | test/files/neg/t8610-arg.check | 8 | ||||
-rw-r--r-- | test/files/neg/warn-inferred-any.flags | 2 |
5 files changed, 20 insertions, 5 deletions
diff --git a/test/files/neg/t4851.flags b/test/files/neg/t4851.flags index ca0d0a0ba3..044ce22c84 100644 --- a/test/files/neg/t4851.flags +++ b/test/files/neg/t4851.flags @@ -1 +1 @@ --Ywarn-adapted-args -Xfatal-warnings -deprecation +-Xlint:adapted-args -Xfatal-warnings -deprecation diff --git a/test/files/neg/t8525.check b/test/files/neg/t8525.check index 554ab23253..5287e43b7a 100644 --- a/test/files/neg/t8525.check +++ b/test/files/neg/t8525.check @@ -1,6 +1,15 @@ +t8525.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 + ^ t8525.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 ^ +t8525.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. -one warning found +three warnings found one error found diff --git a/test/files/neg/t8525.flags b/test/files/neg/t8525.flags index f19af1f717..53b2dfe7ec 100644 --- a/test/files/neg/t8525.flags +++ b/test/files/neg/t8525.flags @@ -1 +1 @@ --Xfatal-warnings -Xlint:-warn-missing-interpolator +-Xfatal-warnings -Xlint:-missing-interpolator -Xlint diff --git a/test/files/neg/t8610-arg.check b/test/files/neg/t8610-arg.check index 4f194ce84a..ea2805508d 100644 --- a/test/files/neg/t8610-arg.check +++ b/test/files/neg/t8610-arg.check @@ -1,6 +1,12 @@ 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 ^ @@ -8,5 +14,5 @@ t8610-arg.scala:8: warning: side-effecting nullary methods are discouraged: sugg def u: Unit = () // unitarian universalist ^ error: No warnings can be incurred under -Xfatal-warnings. -three warnings found +four warnings found one error found diff --git a/test/files/neg/warn-inferred-any.flags b/test/files/neg/warn-inferred-any.flags index a3127d392a..b580dfbbe3 100644 --- a/test/files/neg/warn-inferred-any.flags +++ b/test/files/neg/warn-inferred-any.flags @@ -1 +1 @@ --Xfatal-warnings -Ywarn-infer-any +-Xfatal-warnings -Xlint:infer-any |