summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Vigdorchik <eugene.vigdorchik@gmail.com>2013-04-12 15:46:25 +0400
committerEugene Vigdorchik <eugene.vigdorchik@gmail.com>2013-04-17 15:08:15 +0400
commit9d98b6d2ad68ceefce5278f8b980d1a05b3fefd4 (patch)
tree95930c57111b8cf369ea2e8cec5f7c4c75958e41
parentfc65423d8d6a7548393d212e17c8563cf40bcfc0 (diff)
downloadscala-9d98b6d2ad68ceefce5278f8b980d1a05b3fefd4.tar.gz
scala-9d98b6d2ad68ceefce5278f8b980d1a05b3fefd4.tar.bz2
scala-9d98b6d2ad68ceefce5278f8b980d1a05b3fefd4.zip
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.
-rw-r--r--src/compiler/scala/tools/nsc/interactive/Global.scala6
1 files 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 {