summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/Global.scala
diff options
context:
space:
mode:
authorSom Snytt <som.snytt@gmail.com>2015-02-25 20:33:20 -0800
committerSom Snytt <som.snytt@gmail.com>2015-03-03 08:10:45 -0800
commita180f5f24f2094112a01cdb02e0e8f218db68d70 (patch)
treeb0a2541bf71bce34177f26c72b414902d21ccda3 /src/compiler/scala/tools/nsc/Global.scala
parent3a32ae3651f69237bde32598674bc135ad9e4064 (diff)
downloadscala-a180f5f24f2094112a01cdb02e0e8f218db68d70.tar.gz
scala-a180f5f24f2094112a01cdb02e0e8f218db68d70.tar.bz2
scala-a180f5f24f2094112a01cdb02e0e8f218db68d70.zip
SI-9170 More flexible SessionTest
SessionTest session text can include line continuations and pasted text. Pasted script (which looks like a double prompt) probably doesn't work. This commit includes @retronym's SI-9170 one-liner.
Diffstat (limited to 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index 1c9dbad4dd..b233acf271 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -1551,7 +1551,8 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
if (reporter.hasErrors) {
for ((sym, file) <- symSource.iterator) {
- sym.reset(new loaders.SourcefileLoader(file))
+ if (file != null)
+ sym.reset(new loaders.SourcefileLoader(file))
if (sym.isTerm)
sym.moduleClass reset loaders.moduleClassLoader
}