From 5e62c59aad9dabb3b07e2330d2f8b937f48b93e8 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Thu, 17 Jul 2014 11:44:43 +0200 Subject: Reduce Context iface: remove dead code. --- .../scala/tools/nsc/typechecker/Contexts.scala | 37 ---------------------- 1 file changed, 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 -- cgit v1.2.3