diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-05-30 13:00:38 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-05-30 13:00:38 +0200 |
commit | c98aa6f9b149550243b68274e24a6f3174b7f85b (patch) | |
tree | 9526ef9b449fa584a1c44baec52f81049badad1d /src | |
parent | d079e769b9372daae8d7770c4156f85ea1af6621 (diff) | |
download | scala-c98aa6f9b149550243b68274e24a6f3174b7f85b.tar.gz scala-c98aa6f9b149550243b68274e24a6f3174b7f85b.tar.bz2 scala-c98aa6f9b149550243b68274e24a6f3174b7f85b.zip |
SI-8637 fixes toolbox phase corruption
It turns out, Toolbox.typecheck hasn't been properly re-initializing its state
between requests.
In particular, globalPhase was left untouched, which made the compiler
think that it's past typer, and that in turn disabled implicits.
This commit applies a symptomatic fix to this problem.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/reflect/ToolBoxFactory.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/reflect/ToolBoxFactory.scala b/src/compiler/scala/tools/reflect/ToolBoxFactory.scala index 3b12086cc7..923297bafb 100644 --- a/src/compiler/scala/tools/reflect/ToolBoxFactory.scala +++ b/src/compiler/scala/tools/reflect/ToolBoxFactory.scala @@ -141,6 +141,7 @@ abstract class ToolBoxFactory[U <: JavaUniverse](val u: U) { factorySelf => val run = new Run run.symSource(ownerClass) = NoAbstractFile // need to set file to something different from null, so that currentRun.defines works phase = run.typerPhase // need to set a phase to something <= typerPhase, otherwise implicits in typedSelect will be disabled + globalPhase = run.typerPhase // amazing... looks like phase and globalPhase are different things, so we need to set them separately currentTyper.context.setReportErrors() // need to manually set context mode, otherwise typer.silent will throw exceptions reporter.reset() |