diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-07-17 11:44:43 +0200 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-07-17 15:52:38 +0200 |
commit | 5e62c59aad9dabb3b07e2330d2f8b937f48b93e8 (patch) | |
tree | 0054b19b12f2ac04714f1828d0f530abefd8a8c9 | |
parent | 03baff77059df0632e9acb9fedac3702b2687924 (diff) | |
download | scala-5e62c59aad9dabb3b07e2330d2f8b937f48b93e8.tar.gz scala-5e62c59aad9dabb3b07e2330d2f8b937f48b93e8.tar.bz2 scala-5e62c59aad9dabb3b07e2330d2f8b937f48b93e8.zip |
Reduce Context iface: remove dead code.
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index 6adf7ba5cc..8b53e8eeac 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -331,16 +331,6 @@ trait Contexts { self: Analyzer => private var _reportBuffer: ReportBuffer = new ReportBuffer /** A buffer for errors and warnings, used with `this.bufferErrors == true` */ def reportBuffer = _reportBuffer - /** Discard the current report buffer, and replace with an empty one */ - def useFreshReportBuffer() = _reportBuffer = new ReportBuffer - /** Discard the current report buffer, and replace with `other` */ - def restoreReportBuffer(other: ReportBuffer) = _reportBuffer = other - - /** The first error, if any, in the report buffer */ - def firstError: Option[AbsTypeError] = reportBuffer.firstError - def errors: Seq[AbsTypeError] = reportBuffer.errors - /** Does the report buffer contain any errors? */ - def hasErrors = reportBuffer.hasErrors def reportErrors = this(ReportErrors) def bufferErrors = this(BufferErrors) @@ -352,25 +342,6 @@ trait Contexts { self: Analyzer => private def setThrowErrors(): Unit = this(ReportErrors | AmbiguousErrors | BufferErrors) = false private def setAmbiguousErrors(report: Boolean): Unit = this(AmbiguousErrors) = report - /** Append the given errors to the report buffer */ - def updateBuffer(errors: Traversable[AbsTypeError]) = reportBuffer ++= errors - /** Clear all errors from the report buffer */ - def flushBuffer() { reportBuffer.clearAllErrors() } - /** Return and clear all errors from the report buffer */ - def flushAndReturnBuffer(): immutable.Seq[AbsTypeError] = { - val current = reportBuffer.errors - reportBuffer.clearAllErrors() - current - } - - /** Issue and clear all warnings from the report buffer */ - def flushAndIssueWarnings() { - reportBuffer.warnings foreach { - case (pos, msg) => reporter.warning(pos, msg) - } - reportBuffer.clearAllWarnings() - } - /** Try inference twice, once without views and once with views, * unless views are already disabled. @@ -1329,14 +1300,6 @@ trait Contexts { self: Analyzer => errorBuffer.clear() this } - def clearErrors(removeF: PartialFunction[AbsTypeError, Boolean]): this.type = { - errorBuffer.retain(!PartialFunction.cond(_)(removeF)) - this - } - def retainErrors(leaveF: PartialFunction[AbsTypeError, Boolean]): this.type = { - errorBuffer.retain(PartialFunction.cond(_)(leaveF)) - this - } def clearAllWarnings(): this.type = { warningBuffer.clear() this |