diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-05-22 15:19:23 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-05-22 15:19:23 -0700 |
commit | c842ef3097a0ef5acb98fa85140f24f367885468 (patch) | |
tree | a4aa2fb1cef89aebd62f53197af5cb17cc6b0a66 | |
parent | 15e3f8c2cfbff2b4080daf6a6f7ecb233f45b456 (diff) | |
parent | 1d7625306b7aad86408ae191e4019a9558685fa8 (diff) | |
download | scala-c842ef3097a0ef5acb98fa85140f24f367885468.tar.gz scala-c842ef3097a0ef5acb98fa85140f24f367885468.tar.bz2 scala-c842ef3097a0ef5acb98fa85140f24f367885468.zip |
Merge pull request #604 from hubertp/issue/5044
More info regarding SI-5044. Already discussed with @lrytz.
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 4 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index 0924789948..29249023b9 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -438,8 +438,8 @@ trait Contexts { self: Analyzer => def enclosingContextChain: List[Context] = this :: outer.enclosingContextChain - override def toString = "Context(%s@%s unit=%s scope=%s errors=%b)".format( - owner.fullName, tree.shortClass, unit, scope.##, hasErrors + override def toString = "Context(%s@%s unit=%s scope=%s errors=%b, reportErrors=%b, throwErrors=%b)".format( + owner.fullName, tree.shortClass, unit, scope.##, hasErrors, reportErrors, throwErrors ) /** Is `sub` a subclass of `base` or a companion object of such a subclass? */ diff --git a/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala b/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala index 88e464a1f4..d1f319311e 100644 --- a/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala +++ b/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala @@ -482,6 +482,10 @@ trait NamesDefaults { self: Analyzer => try typer.silent { tpr => val res = tpr.typed(arg, subst(paramtpe)) // better warning for SI-5044: if `silent` was not actually silent give a hint to the user + // [H]: the reason why `silent` is not silent is because the cyclic reference exception is + // thrown in a context completely different from `context` here. The exception happens while + // completing the type, and TypeCompleter is created/run with a non-silent Namer `context` + // and there is at the moment no way to connect the two unless we go through some global state. if (errsBefore < reporter.ERROR.count) WarnAfterNonSilentRecursiveInference(param, arg)(context) res |