summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/Global.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2009-06-24 15:37:16 +0000
committerMartin Odersky <odersky@gmail.com>2009-06-24 15:37:16 +0000
commit410efa8317f2a244f45f33b2ae7c17be5472f5d5 (patch)
tree0cddab6b90904718b8162797656ab7076bb920ce /src/compiler/scala/tools/nsc/Global.scala
parent1c9870541fb22ac032edaa0be0103cc1aa2c99b4 (diff)
downloadscala-410efa8317f2a244f45f33b2ae7c17be5472f5d5.tar.gz
scala-410efa8317f2a244f45f33b2ae7c17be5472f5d5.tar.bz2
scala-410efa8317f2a244f45f33b2ae7c17be5472f5d5.zip
fixed variance bug; added smart brace insertion...
fixed variance bug; added smart brace insertion to parser. moved interactive compiler interface along.
Diffstat (limited to 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r--src/compiler/scala/tools/nsc/Global.scala16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala
index 6db3bfd626..76507271c0 100644
--- a/src/compiler/scala/tools/nsc/Global.scala
+++ b/src/compiler/scala/tools/nsc/Global.scala
@@ -307,12 +307,15 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable
final def applyPhase(unit: CompilationUnit) {
if (settings.debug.value) inform("[running phase " + name + " on " + unit + "]")
val unit0 = currentRun.currentUnit
- currentRun.currentUnit = unit
- reporter.setSource(unit.source)
- if (!cancelled(unit)) apply(unit)
- currentRun.advanceUnit
- assert(currentRun.currentUnit == unit)
- currentRun.currentUnit = unit0
+ try {
+ currentRun.currentUnit = unit
+ reporter.setSource(unit.source)
+ if (!cancelled(unit)) apply(unit)
+ currentRun.advanceUnit
+ } finally {
+ assert(currentRun.currentUnit == unit)
+ currentRun.currentUnit = unit0
+ }
}
}
@@ -397,6 +400,7 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable
val runsRightAfter = Some("tailcalls")
} with SpecializeTypes
+ // phaseName = "erasure"
object erasure extends {
val global: Global.this.type = Global.this
val runsAfter = List[String]("explicitouter")