Skip to content

Commit

Permalink
Merge pull request #2387 from vigdorchik/interactive_scaladoc
Browse files Browse the repository at this point in the history
Interactive scaladoc: demand new typer run when done.
  • Loading branch information
adriaanm committed Apr 22, 2013
2 parents d484c17 + 9d98b6d commit 4dcb33e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/compiler/scala/tools/nsc/interactive/Global.scala
Expand Up @@ -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))
Expand All @@ -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 {
Expand Down

0 comments on commit 4dcb33e

Please sign in to comment.