diff options
author | Martin Odersky <odersky@gmail.com> | 2011-01-21 15:41:19 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2011-01-21 15:41:19 +0000 |
commit | 017e96230a9af100af57a1b7b8379382abf3f7c6 (patch) | |
tree | 658bd96b933d8c7e0dca3e35427af686f73586c4 /src | |
parent | b09bc250128dde3657a769786e7afffa32cfaa1b (diff) | |
download | scala-017e96230a9af100af57a1b7b8379382abf3f7c6.tar.gz scala-017e96230a9af100af57a1b7b8379382abf3f7c6.tar.bz2 scala-017e96230a9af100af57a1b7b8379382abf3f7c6.zip |
getLinkPos now removes the unit it loaded.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/interactive/Global.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala index 94cede6dbb..3e5e2ee5bf 100644 --- a/src/compiler/scala/tools/nsc/interactive/Global.scala +++ b/src/compiler/scala/tools/nsc/interactive/Global.scala @@ -479,6 +479,7 @@ self => def getLinkPos(sym: Symbol, source: SourceFile, response: Response[Position]) { informIDE("getLinkPos "+sym+" "+source) respond(response) { + val preExisting = unitOfFile isDefinedAt source.file reloadSources(List(source)) val owner = sym.owner if (owner.isClass) { @@ -486,6 +487,7 @@ self => val newsym = pre.decl(sym.name) filter { alt => sym.isType || matchesType(pre.memberType(alt), adaptToNewRunMap(sym.tpe), false) } + if (!preExisting) removeUnitOf(source) if (newsym == NoSymbol) { debugLog("link not found "+sym+" "+source+" "+pre) NoPosition |