summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2011-02-13 20:53:22 +0000
committerMartin Odersky <odersky@gmail.com>2011-02-13 20:53:22 +0000
commitce73a10d3c77cf83eb14ad081c702438ee836c6f (patch)
treed98afeddf19f5b4e80d47b2a822c43abddb2a2eb /src
parent1584f3f018f93950b155f16c30e3f823af96311c (diff)
downloadscala-ce73a10d3c77cf83eb14ad081c702438ee836c6f.tar.gz
scala-ce73a10d3c77cf83eb14ad081c702438ee836c6f.tar.bz2
scala-ce73a10d3c77cf83eb14ad081c702438ee836c6f.zip
corrections after recent comment to not parse o...
corrections after recent comment to not parse on reloadSources, so that it is assured that units areparsed before type checking.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/interactive/Global.scala2
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 2f63f98e84..cef6ba5dbd 100644
--- a/src/compiler/scala/tools/nsc/interactive/Global.scala
+++ b/src/compiler/scala/tools/nsc/interactive/Global.scala
@@ -509,6 +509,7 @@ self =>
result
case Some(unit) =>
informIDE("typedTreeAt " + pos)
+ if (unit.status == NotLoaded) parseAndEnter(unit)
val tree = locateTree(pos)
debugLog("at pos "+pos+" was found: "+tree.getClass+" "+tree.pos.show)
if (stabilizedType(tree) ne null) {
@@ -534,6 +535,7 @@ self =>
informIDE("typedTree " + source + " forceReload: " + forceReload)
val unit = getOrCreateUnitOf(source)
if (forceReload) reset(unit)
+ if (unit.status == NotLoaded) parseAndEnter(unit)
if (unit.status <= PartiallyChecked) {
//newTyperRun() // not deeded for idempotent type checker phase
typeCheck(unit)