From 1016d68bef18ea078a83af6e550adf2d8a818ddd Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sun, 7 Nov 2010 23:48:57 +0000 Subject: An overhaul of Global. consistently, and remove things which are not being used anywhere in the visible universe. Beyond general polish here are some of the feature-like additions I can remember: * -Xshow-phases now includes descriptions of the phases. * -Xshow-class and -Xshow-object did not work as far as I could tell: if they didn't, now they do. If they did, now they work better. And you don't have to give it a fully qualified name anymore. * -Xprint-icode will generate *.icode files (don't also have to say -Xprint:icode) * counts of deprecation and unchcked warnings are given * More documentation of what global is doing. I tried not to break anything which might be using Global, but let me know if I overshot somewhere. No review. --- src/compiler/scala/tools/nsc/CompilationUnits.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/compiler/scala/tools/nsc/CompilationUnits.scala') diff --git a/src/compiler/scala/tools/nsc/CompilationUnits.scala b/src/compiler/scala/tools/nsc/CompilationUnits.scala index 564e4f2705..3c5e033c74 100644 --- a/src/compiler/scala/tools/nsc/CompilationUnits.scala +++ b/src/compiler/scala/tools/nsc/CompilationUnits.scala @@ -76,12 +76,12 @@ trait CompilationUnits { self: Global => reporter.warning(pos, msg) def deprecationWarning(pos: Position, msg: String) = - if (settings.deprecation.value) warning(pos, msg) - else currentRun.deprecationWarnings = true + if (opt.deprecation) warning(pos, msg) + else currentRun.deprecationWarnings += 1 def uncheckedWarning(pos: Position, msg: String) = - if (settings.unchecked.value) warning(pos, msg) - else currentRun.uncheckedWarnings = true + if (opt.unchecked) warning(pos, msg) + else currentRun.uncheckedWarnings += 1 def incompleteInputError(pos: Position, msg:String) = reporter.incompleteInputError(pos, msg) -- cgit v1.2.3