summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/Global.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-08-09 17:35:29 +0000
committerPaul Phillips <paulp@improving.org>2011-08-09 17:35:29 +0000
commitc1aaf1fc7ad3d76bb5376d796577e0effdd70bf4 (patch)
treed89ddcb0f6b241b9cf1560b538e703cf1760d12e /src/compiler/scala/tools/nsc/Global.scala
parent554fb11b0cd2f76d7990a0de935c8deef30f95dc (diff)
downloadscala-c1aaf1fc7ad3d76bb5376d796577e0effdd70bf4.tar.gz
scala-c1aaf1fc7ad3d76bb5376d796577e0effdd70bf4.tar.bz2
scala-c1aaf1fc7ad3d76bb5376d796577e0effdd70bf4.zip
Don't discard deprecation/unchecked warnings re...
Don't discard deprecation/unchecked warnings regardless of settings. Changed warnings code to accumulate them rather than thoughtlessly discarding them and issuing its well-known taunt. In the repl you can take advantage of this with the :warnings command, which will show the suppressed warnings from the last line which had any. Be advised that at the moment it has some issues: unchecked warnings aren't making it out, and near repl startup neither are deprecation warnings, so don't open a bunch of tickets please. References SI-4594, no review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index 83f4ce438f..57b5ed45ea 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -772,8 +772,8 @@ class Global(var currentSettings: Settings, var reporter: Reporter) extends Symb
var currentUnit: CompilationUnit = _
/** Counts for certain classes of warnings during this run. */
- var deprecationWarnings: Int = 0
- var uncheckedWarnings: Int = 0
+ var deprecationWarnings: List[(Position, String)] = Nil
+ var uncheckedWarnings: List[(Position, String)] = Nil
/** Progress tracking. Measured in "progress units" which are 1 per
* compilation unit per phase completed.
@@ -954,8 +954,8 @@ class Global(var currentSettings: Settings, var reporter: Reporter) extends Symb
if (option.isDefault && count > 0)
warning("there were %d %s warnings; re-run with %s for details".format(count, what, option.name))
)
- warn(deprecationWarnings, "deprecation", settings.deprecation)
- warn(uncheckedWarnings, "unchecked", settings.unchecked)
+ warn(deprecationWarnings.size, "deprecation", settings.deprecation)
+ warn(uncheckedWarnings.size, "unchecked", settings.unchecked)
// todo: migrationWarnings
}
}