summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/CompilationUnits.scala2
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala9
2 files changed, 8 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/CompilationUnits.scala b/src/compiler/scala/tools/nsc/CompilationUnits.scala
index 767df0791e..f89f278338 100644
--- a/src/compiler/scala/tools/nsc/CompilationUnits.scala
+++ b/src/compiler/scala/tools/nsc/CompilationUnits.scala
@@ -91,7 +91,7 @@ trait CompilationUnits { self: Global =>
currentRun.deprecationWarnings.warn(pos, msg)
def uncheckedWarning(pos: Position, msg: String) =
- currentRun.uncheckedWarnings.warn(pos, msg)
+ currentRun.uncheckedWarnings0.warn(pos, msg)
def inlinerWarning(pos: Position, msg: String) =
currentRun.inlinerWarnings.warn(pos, msg)
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index bbeee3220b..73c68f44d4 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -967,10 +967,15 @@ class Global(var currentSettings: Settings, var reporter: NscReporter) extends S
var currentUnit: CompilationUnit = NoCompilationUnit
val deprecationWarnings = new ConditionalWarning("deprecation", settings.deprecation)
- val uncheckedWarnings = new ConditionalWarning("unchecked", settings.unchecked)
+ // This change broke sbt; I gave it the thrilling name of uncheckedWarnings0 so
+ // as to recover uncheckedWarnings for its ever-fragile compiler interface.
+ 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, uncheckedWarnings, featureWarnings, inlinerWarnings)
+ val allConditionalWarnings = List(deprecationWarnings, uncheckedWarnings0, featureWarnings, inlinerWarnings)
+
+ // for sbt's benefit
+ def uncheckedWarnings: List[(Position, String)] = uncheckedWarnings0.warnings.toList
var reportedFeature = Set[Symbol]()