diff options
author | Paul Phillips <paulp@improving.org> | 2010-02-25 01:35:46 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-02-25 01:35:46 +0000 |
commit | 2bf3a560d6b9c5c187f1b04e1cd687d7a3604bb7 (patch) | |
tree | ee0ca4db3ff79f340c73e45c01a8a0ebaba92cd8 /src/compiler/scala/tools/nsc/Global.scala | |
parent | 4aa7ec183ea0f9938ced697fce3494234d14e71d (diff) | |
download | scala-2bf3a560d6b9c5c187f1b04e1cd687d7a3604bb7.tar.gz scala-2bf3a560d6b9c5c187f1b04e1cd687d7a3604bb7.tar.bz2 scala-2bf3a560d6b9c5c187f1b04e1cd687d7a3604bb7.zip |
Created -Yfatal-warnings, as otherwise I can't ...
Created -Yfatal-warnings, as otherwise I can't see how to make partest
fail on the presence of an unchecked warning. It'll come in handy
anyway. Now we have a real tough guy's command line for those who want
it:
% scalac -unchecked -deprecation -Yfatal-warnings `find . -name
'*.scala'`
Not for the timid. Review by community.
Diffstat (limited to 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/Global.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index 4e14ec6fb1..92c72b1549 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -136,7 +136,9 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable // ------------------ Reporting ------------------------------------- def error(msg: String) = reporter.error(NoPosition, msg) - def warning(msg: String) = reporter.warning(NoPosition, msg) + def warning(msg: String) = + if (settings.Ywarnfatal.value) reporter.error(NoPosition, msg) + else reporter.warning(NoPosition, msg) def inform(msg: String) = reporter.info(NoPosition, msg, true) def inform[T](msg: String, value: T): T = { inform(msg+value); value } |