summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Implicits.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Implicits.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
index 965547d835..e4925b939e 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala
@@ -1359,7 +1359,8 @@ trait Implicits {
if (Statistics.canEnable) Statistics.incCounter(inscopeImplicitHits)
}
if (result.isFailure) {
- val previousErrs = context.flushAndReturnBuffer()
+ val previousErrs = context.reportBuffer.errors
+ context.reportBuffer.clearAllErrors()
val failstart = if (Statistics.canEnable) Statistics.startTimer(oftypeFailNanos) else null
val succstart = if (Statistics.canEnable) Statistics.startTimer(oftypeSucceedNanos) else null
@@ -1371,7 +1372,7 @@ trait Implicits {
result = searchImplicit(implicitsOfExpectedType, isLocalToCallsite = false)
if (result.isFailure) {
- context.updateBuffer(previousErrs)
+ context.reportBuffer ++= previousErrs
if (Statistics.canEnable) Statistics.stopTimer(oftypeFailNanos, failstart)
} else {
if (Statistics.canEnable) Statistics.stopTimer(oftypeSucceedNanos, succstart)
@@ -1428,9 +1429,8 @@ trait Implicits {
// thus, start each type var off with a fresh for every typedImplicit
resetTVars()
// any previous errors should not affect us now
- context.flushBuffer()
-
- val res = typedImplicit(ii, ptChecked = false, isLocalToCallsite)
+ context.reportBuffer.clearAllErrors()
+ val res = typedImplicit(ii, ptChecked = false, isLocalToCallsite)
if (res.tree ne EmptyTree) List((res, tvars map (_.constr)))
else Nil
}