summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/Global.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2014-06-24 15:54:10 +0200
committerAdriaan Moors <adriaan.moors@typesafe.com>2014-07-04 15:49:08 +0200
commit9fc68e19309cef139c4827fbed76952011995e10 (patch)
tree789f30eb129b93efe74d7a026a005fc4a6c53330 /src/compiler/scala/tools/nsc/Global.scala
parentb7242013830510776fbb93bbf0e883532133030c (diff)
downloadscala-9fc68e19309cef139c4827fbed76952011995e10.tar.gz
scala-9fc68e19309cef139c4827fbed76952011995e10.tar.bz2
scala-9fc68e19309cef139c4827fbed76952011995e10.zip
Remove deprecationWarning, currentReporting from Reporting
This moves us a bit closer to the goal of having a single entry point to reporting. Must modularize Reporting a bit so it can be used in Variances (need a reference to `currentRun` in `reflect.internal.Reporting`).
Diffstat (limited to 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index a6fa3bf1dc..572e579aca 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -1045,7 +1045,6 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
def currentUnit: CompilationUnit = if (currentRun eq null) NoCompilationUnit else currentRun.currentUnit
def currentSource: SourceFile = if (currentUnit.exists) currentUnit.source else lastSeenSourceFile
def currentFreshNameCreator = currentUnit.fresh
- def currentReporting = currentRun.reporting
def isGlobalInitialized = (
definitions.isDefinitionsInitialized
@@ -1093,7 +1092,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
/** Don't want to introduce new errors trying to report errors,
* so swallow exceptions.
*/
- def supplementTyperState(errorMessage: String): String = try {
+ override def supplementTyperState(errorMessage: String): String = try {
val tree = analyzer.lastTreeToTyper
val sym = tree.symbol
val tpe = tree.tpe
@@ -1156,7 +1155,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
/** A Run is a single execution of the compiler on a set of units.
*/
- class Run extends RunContextApi {
+ class Run extends RunContextApi with RunReporting {
/** Have been running into too many init order issues with Run
* during erroneous conditions. Moved all these vals up to the
* top of the file so at least they're not trivially null.
@@ -1165,8 +1164,6 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
/** The currently compiled unit; set from GlobalPhase */
var currentUnit: CompilationUnit = NoCompilationUnit
- val reporting = new PerRunReporting
-
// used in sbt
def uncheckedWarnings: List[(Position, String)] = reporting.uncheckedWarnings
// used in sbt