summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/interactive/Global.scala7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/interactive/Global.scala b/src/compiler/scala/tools/nsc/interactive/Global.scala
index 44b871f1a3..11ad5d9ce3 100644
--- a/src/compiler/scala/tools/nsc/interactive/Global.scala
+++ b/src/compiler/scala/tools/nsc/interactive/Global.scala
@@ -86,7 +86,12 @@ class Global(settings: Settings, reporter: Reporter)
*/
protected val toBeRemoved = new ArrayBuffer[AbstractFile] with SynchronizedBuffer[AbstractFile]
- type ResponseMap = MultiHashMap[SourceFile, Response[Tree]]
+ class ResponseMap extends MultiHashMap[SourceFile, Response[Tree]] {
+ override def += (binding: (SourceFile, Set[Response[Tree]])) = {
+ assert(interruptsEnabled, "delayed operation within an ask")
+ super.+=(binding)
+ }
+ }
/** A map that associates with each abstract file the set of responses that are waiting
* (via waitLoadedTyped) for the unit associated with the abstract file to be loaded and completely typechecked.