From 8b2a63fa3ce33e271c5c8ba92253e4f412f18a9b Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 14 Mar 2014 13:36:36 +0100 Subject: Stop running phases after errors were encountered --- src/dotty/tools/dotc/Run.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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) + } } } -- cgit v1.2.3