summaryrefslogtreecommitdiff
path: root/src/interactive
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-12-06 11:00:43 +0100
committerJason Zaugg <jzaugg@gmail.com>2013-12-06 11:00:43 +0100
commit2c4ed0b25042cc19dddd7585e9afd9ea78d2d86f (patch)
tree96659eefc43dc0f35452d94ca8971b22bc6b27cf /src/interactive
parentfa0c95b442b71f23bfc4ee4ff902e5e9a8e60d1f (diff)
parent7c1d1149291e1b83c96a0f6954144b9e97c030ea (diff)
downloadscala-2c4ed0b25042cc19dddd7585e9afd9ea78d2d86f.tar.gz
scala-2c4ed0b25042cc19dddd7585e9afd9ea78d2d86f.tar.bz2
scala-2c4ed0b25042cc19dddd7585e9afd9ea78d2d86f.zip
Merge commit '7c1d114' into merge-2.10.x-to-master
Conflicts: src/compiler/scala/tools/nsc/interactive/Global.scala
Diffstat (limited to 'src/interactive')
-rw-r--r--src/interactive/scala/tools/nsc/interactive/Global.scala25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/interactive/scala/tools/nsc/interactive/Global.scala b/src/interactive/scala/tools/nsc/interactive/Global.scala
index 441398e443..6b46a3b6dc 100644
--- a/src/interactive/scala/tools/nsc/interactive/Global.scala
+++ b/src/interactive/scala/tools/nsc/interactive/Global.scala
@@ -327,7 +327,12 @@ class Global(settings: Settings, _reporter: Reporter, projectName: String = "")
* @param result The transformed node
*/
override def signalDone(context: Context, old: Tree, result: Tree) {
- if (interruptsEnabled && analyzer.lockedCount == 0) {
+ val canObserveTree = (
+ interruptsEnabled
+ && analyzer.lockedCount == 0
+ && !context.bufferErrors // SI-7558 look away during exploratory typing in "silent mode"
+ )
+ if (canObserveTree) {
if (context.unit.exists &&
result.pos.isOpaqueRange &&
(result.pos includes context.unit.targetPos)) {
@@ -338,14 +343,16 @@ class Global(settings: Settings, _reporter: Reporter, projectName: String = "")
}
throw new TyperResult(located)
}
- try {
- checkForMoreWork(old.pos)
- } catch {
- case ex: ValidateException => // Ignore, this will have been reported elsewhere
- debugLog("validate exception caught: "+ex)
- case ex: Throwable =>
- log.flush()
- throw ex
+ else {
+ try {
+ checkForMoreWork(old.pos)
+ } catch {
+ case ex: ValidateException => // Ignore, this will have been reported elsewhere
+ debugLog("validate exception caught: "+ex)
+ case ex: Throwable =>
+ log.flush()
+ throw ex
+ }
}
}
}