summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/Global.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2011-10-25 16:24:56 +0000
committerMartin Odersky <odersky@gmail.com>2011-10-25 16:24:56 +0000
commit893e8b63912ab7705468282191f8ff3c7c19e89e (patch)
tree0a3ce60173c9838e41752975fc3b6ced5c38a70b /src/compiler/scala/tools/nsc/Global.scala
parent5f0ef121a12c65bb24bf0af79c5f7768fb03f6af (diff)
downloadscala-893e8b63912ab7705468282191f8ff3c7c19e89e.tar.gz
scala-893e8b63912ab7705468282191f8ff3c7c19e89e.tar.bz2
scala-893e8b63912ab7705468282191f8ff3c7c19e89e.zip
Fixed problem when running under -Xcheckinit fo...
Fixed problem when running under -Xcheckinit for the code.scala test by avoiding accessing an unitialized variable. Good catch, -Xcheckinit! Review by extempore.
Diffstat (limited to 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index 81f3411dd5..b798fe71ba 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -58,7 +58,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter) extends Symb
def mkAttributedQualifier(tpe: Type, termSym: Symbol): Tree = gen.mkAttributedQualifier(tpe, termSym)
- def picklerPhase: Phase = currentRun.picklerPhase
+ def picklerPhase: Phase = if (currentRun.isDefined) currentRun.picklerPhase else NoPhase
// platform specific elements