summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-11-06 23:26:38 +1000
committerJason Zaugg <jzaugg@gmail.com>2014-11-06 23:26:38 +1000
commit000de44e3b1f1c0c4bc30eda8ef155548714a6af (patch)
tree5ee87dcffb91bcb5a375b3e8580f2238a5bd082c /src
parentced9e167d9d2c9016e76b6db94ceea7335d37bf2 (diff)
parentd6d8c06e02fa1e93e5dd37eeb08b2c1bb3805dd8 (diff)
downloadscala-000de44e3b1f1c0c4bc30eda8ef155548714a6af.tar.gz
scala-000de44e3b1f1c0c4bc30eda8ef155548714a6af.tar.bz2
scala-000de44e3b1f1c0c4bc30eda8ef155548714a6af.zip
Merge pull request #4094 from retronym/ticket/8962
SI-8962 Fix regression with skolems in pattern translation
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Contexts.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
index eb29ccf4e1..e278130437 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
@@ -330,7 +330,7 @@ trait Contexts { self: Analyzer =>
// if set, errors will not be reporter/thrown
def bufferErrors = reporter.isBuffering
- def reportErrors = !bufferErrors
+ def reportErrors = !(bufferErrors || reporter.isThrowing)
// whether to *report* (which is separate from buffering/throwing) ambiguity errors
def ambiguousErrors = this(AmbiguousErrors)
@@ -1247,6 +1247,7 @@ trait Contexts { self: Analyzer =>
def makeImmediate: ContextReporter = this
def makeBuffering: ContextReporter = this
def isBuffering: Boolean = false
+ def isThrowing: Boolean = false
/** Emit an ambiguous error according to context.ambiguousErrors
*
@@ -1384,6 +1385,7 @@ trait Contexts { self: Analyzer =>
* TODO: get rid of it, use ImmediateReporter and a check for reporter.hasErrors where necessary
*/
private[typechecker] class ThrowingReporter extends ContextReporter {
+ override def isThrowing = true
protected def handleError(pos: Position, msg: String): Unit = throw new TypeError(pos, msg)
}