diff options
author | Martin Odersky <odersky@gmail.com> | 2010-12-21 11:03:44 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2010-12-21 11:03:44 +0000 |
commit | ed9fb7210448a11bae0f368ff021bacf00654c39 (patch) | |
tree | 6ea8d9a77a3b1ee45c93d456cd26b8ad7af7c42d /src | |
parent | a887c83972cd1d4110d7ca17d982ee77f68ab0f0 (diff) | |
download | scala-ed9fb7210448a11bae0f368ff021bacf00654c39.tar.gz scala-ed9fb7210448a11bae0f368ff021bacf00654c39.tar.bz2 scala-ed9fb7210448a11bae0f368ff021bacf00654c39.zip |
Quik fixes for - double definitions, - tree not...
Quik fixes for - double definitions, - tree not found, - reloadSources
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/interactive/Global.scala | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala index f90bf83b52..aa139d3a92 100644 --- a/src/compiler/scala/tools/nsc/interactive/Global.scala +++ b/src/compiler/scala/tools/nsc/interactive/Global.scala @@ -352,7 +352,7 @@ self => /** Move list of files to front of allSources */ def moveToFront(fs: List[SourceFile]) { - allSources = fs ++ (allSources -- fs) + allSources = fs ++ (allSources diff fs) } // ----------------- Implementations of client commands ----------------------- @@ -397,6 +397,7 @@ self => /** Make sure a set of compilation units is loaded and parsed */ def reloadSources(sources: List[SourceFile]) { newTyperRun() + minRunId = currentRunId sources foreach reloadSource moveToFront(sources) } @@ -424,7 +425,8 @@ self => debugLog("starting targeted type check") newTyperRun() typeCheck(unit) - throw new FatalError("tree not found") + println("tree not found at "+pos) + EmptyTree } catch { case ex: TyperResult => new Locator(pos) locateIn ex.tree } finally { @@ -643,9 +645,9 @@ self => /** canRedefine is used to detect double declarations in multiple source files. * Since the IDE rechecks units several times in the same run, these tests * are disabled by always returning true here. - * (I think we don't need that anymore, therefore disabled) + * (I think we don't need that anymore) */ - // override def canRedefine(sym: Symbol) = false + override def canRedefine(sym: Symbol) = true def typeCheck(unit: CompilationUnit): Unit = { activeLocks = 0 |