From 8a285258fdb37af9f4ba8ced0a5c8fb6fefbf62c Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Wed, 18 Apr 2012 11:29:42 +0100 Subject: Sigh, sbt needs this one too. --- src/compiler/scala/tools/nsc/CompilationUnits.scala | 2 +- src/compiler/scala/tools/nsc/Global.scala | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/compiler/scala/tools/nsc/CompilationUnits.scala b/src/compiler/scala/tools/nsc/CompilationUnits.scala index f89f278338..2f1e15168a 100644 --- a/src/compiler/scala/tools/nsc/CompilationUnits.scala +++ b/src/compiler/scala/tools/nsc/CompilationUnits.scala @@ -88,7 +88,7 @@ trait CompilationUnits { self: Global => reporter.warning(pos, msg) def deprecationWarning(pos: Position, msg: String) = - currentRun.deprecationWarnings.warn(pos, msg) + currentRun.deprecationWarnings0.warn(pos, msg) def uncheckedWarning(pos: Position, msg: String) = currentRun.uncheckedWarnings0.warn(pos, msg) diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index c9394b37b5..6c038162b3 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -974,16 +974,17 @@ class Global(var currentSettings: Settings, var reporter: NscReporter) extends S /** The currently compiled unit; set from GlobalPhase */ var currentUnit: CompilationUnit = NoCompilationUnit - val deprecationWarnings = new ConditionalWarning("deprecation", settings.deprecation) // This change broke sbt; I gave it the thrilling name of uncheckedWarnings0 so // as to recover uncheckedWarnings for its ever-fragile compiler interface. + val deprecationWarnings0 = new ConditionalWarning("deprecation", settings.deprecation) val uncheckedWarnings0 = new ConditionalWarning("unchecked", settings.unchecked) val featureWarnings = new ConditionalWarning("feature", settings.feature) val inlinerWarnings = new ConditionalWarning("inliner", settings.YinlinerWarnings) - val allConditionalWarnings = List(deprecationWarnings, uncheckedWarnings0, featureWarnings, inlinerWarnings) + val allConditionalWarnings = List(deprecationWarnings0, uncheckedWarnings0, featureWarnings, inlinerWarnings) // for sbt's benefit def uncheckedWarnings: List[(Position, String)] = uncheckedWarnings0.warnings.toList + def deprecationWarnings: List[(Position, String)] = deprecationWarnings0.warnings.toList var reportedFeature = Set[Symbol]() -- cgit v1.2.3