summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/interactive/Global.scala12
-rw-r--r--test/files/presentation/t7548b.check2
2 files changed, 8 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala
index b4e8170b19..02a37ec217 100644
--- a/src/compiler/scala/tools/nsc/interactive/Global.scala
+++ b/src/compiler/scala/tools/nsc/interactive/Global.scala
@@ -238,7 +238,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)) {
@@ -247,10 +252,7 @@ class Global(settings: Settings, _reporter: Reporter, projectName: String = "")
println("something's wrong: no "+context.unit+" in "+result+result.pos)
located = result
}
- located.tpe match {
- case _: OverloadedType => ()
- case _ => throw new TyperResult(located)
- }
+ throw new TyperResult(located)
}
else {
try {
diff --git a/test/files/presentation/t7548b.check b/test/files/presentation/t7548b.check
index 5ba69809f1..35445fedf6 100644
--- a/test/files/presentation/t7548b.check
+++ b/test/files/presentation/t7548b.check
@@ -1 +1 @@
-Foo.this.I.+: (other: Foo.I.type)Unit
+Foo.this.I2BI(Foo.this.I).+: (other: Foo.BI.type)Unit