diff options
author | Martin Odersky <odersky@gmail.com> | 2014-03-14 13:36:36 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-03-14 13:36:36 +0100 |
commit | 8b2a63fa3ce33e271c5c8ba92253e4f412f18a9b (patch) | |
tree | 556d8850de4c668450b44785ecc993b6bec007e1 /src | |
parent | db950e5e168f6fd71a367da343e352139e8d653e (diff) | |
download | dotty-8b2a63fa3ce33e271c5c8ba92253e4f412f18a9b.tar.gz dotty-8b2a63fa3ce33e271c5c8ba92253e4f412f18a9b.tar.bz2 dotty-8b2a63fa3ce33e271c5c8ba92253e4f412f18a9b.zip |
Stop running phases after errors were encountered
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/Run.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/Run.scala b/src/dotty/tools/dotc/Run.scala index df7f433f9..160390c4f 100644 --- a/src/dotty/tools/dotc/Run.scala +++ b/src/dotty/tools/dotc/Run.scala @@ -30,8 +30,10 @@ class Run(comp: Compiler)(implicit ctx: Context) { def compileSources(sources: List[SourceFile]) = Stats.monitorHeartBeat { if (sources forall (_.exists)) { units = sources map (new CompilationUnit(_)) - for (phase <- ctx.allPhases) - phase.runOn(units) + for (phase <- ctx.allPhases) { + if (!ctx.reporter.hasErrors) + phase.runOn(units) + } } } |