diff options
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Analyzer.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Analyzer.scala | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Analyzer.scala b/src/compiler/scala/tools/nsc/typechecker/Analyzer.scala index ca9f654b76..7315c6f2c5 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Analyzer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Analyzer.scala @@ -38,7 +38,12 @@ trait Analyzer extends AnyRef def newPhase(_prev: Phase): StdPhase = new StdPhase(_prev) { if (!inIDE) resetTyper() def apply(unit: CompilationUnit) { - unit.body = newTyper(rootContext(unit)).typed(unit.body) + try { + unit.body = newTyper(rootContext(unit)).typed(unit.body) + for (workItem <- unit.toCheck) workItem() + } finally { + unit.toCheck.clear() + } } } } |