diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-07-17 11:42:36 +0200 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2014-07-17 15:51:25 +0200 |
commit | 03baff77059df0632e9acb9fedac3702b2687924 (patch) | |
tree | 36f3aeb2c4ec1851693227acecd79dac4fbd23c4 /src/compiler/scala/tools/nsc/typechecker/Contexts.scala | |
parent | 1f1c131bb3ba1f63a90aca89153353cba2693fba (diff) | |
download | scala-03baff77059df0632e9acb9fedac3702b2687924.tar.gz scala-03baff77059df0632e9acb9fedac3702b2687924.tar.bz2 scala-03baff77059df0632e9acb9fedac3702b2687924.zip |
Reduce Context iface: make contextMode mutators private.
This allows local reasoning about these bits,
giving some more confidence for the refactoring
that's underway.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Contexts.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index f3c337f633..6adf7ba5cc 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -345,12 +345,12 @@ trait Contexts { self: Analyzer => def reportErrors = this(ReportErrors) def bufferErrors = this(BufferErrors) def ambiguousErrors = this(AmbiguousErrors) - def throwErrors = contextMode.inNone(ReportErrors | BufferErrors) + private def throwErrors = contextMode.inNone(ReportErrors | BufferErrors) - def setReportErrors(): Unit = set(enable = ReportErrors | AmbiguousErrors, disable = BufferErrors) - def setBufferErrors(): Unit = set(enable = BufferErrors, disable = ReportErrors | AmbiguousErrors) - def setThrowErrors(): Unit = this(ReportErrors | AmbiguousErrors | BufferErrors) = false - def setAmbiguousErrors(report: Boolean): Unit = this(AmbiguousErrors) = report + private def setReportErrors(): Unit = set(enable = ReportErrors | AmbiguousErrors, disable = BufferErrors) + private def setBufferErrors(): Unit = set(enable = BufferErrors, disable = ReportErrors | AmbiguousErrors) + 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 |