From 9d98b6d2ad68ceefce5278f8b980d1a05b3fefd4 Mon Sep 17 00:00:00 2001 From: Eugene Vigdorchik Date: Fri, 12 Apr 2013 15:46:25 +0400 Subject: Interactive scaladoc: mark new typer run when done. As of now, when backgroundCompile is in the same typer run as scaladoc-fetching logic, typer is confused with stale symbols. --- src/compiler/scala/tools/nsc/interactive/Global.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala index 1f2245abb5..c63cca9b88 100644 --- a/src/compiler/scala/tools/nsc/interactive/Global.scala +++ b/src/compiler/scala/tools/nsc/interactive/Global.scala @@ -856,9 +856,9 @@ class Global(settings: Settings, _reporter: Reporter, projectName: String = "") /** Implements CompilerControl.askDocComment */ private[interactive] def getDocComment(sym: Symbol, source: SourceFile, site: Symbol, fragments: List[(Symbol,SourceFile)], response: Response[(String, String, Position)]) { - informIDE(s"getDocComment $sym at $source site $site") + informIDE(s"getDocComment $sym at $source, site $site") respond(response) { - withTempUnits(fragments.toList.unzip._2){ units => + withTempUnits(fragments.unzip._2){ units => for((sym, src) <- fragments) { val mirror = findMirrorSymbol(sym, units(src)) if (mirror ne NoSymbol) forceDocComment(mirror, units(src)) @@ -871,6 +871,8 @@ class Global(settings: Settings, _reporter: Reporter, projectName: String = "") } } } + // New typer run to remove temp units and drop per-run caches that might refer to symbols entered from temp units. + newTyperRun() } def stabilizedType(tree: Tree): Type = tree match { -- cgit v1.2.3