Skip to content

Commit 8b2a63f

Browse files
committed
Stop running phases after errors were encountered
1 parent db950e5 commit 8b2a63f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/dotty/tools/dotc/Run.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ class Run(comp: Compiler)(implicit ctx: Context) {
3030
def compileSources(sources: List[SourceFile]) = Stats.monitorHeartBeat {
3131
if (sources forall (_.exists)) {
3232
units = sources map (new CompilationUnit(_))
33-
for (phase <- ctx.allPhases)
34-
phase.runOn(units)
33+
for (phase <- ctx.allPhases) {
34+
if (!ctx.reporter.hasErrors)
35+
phase.runOn(units)
36+
}
3537
}
3638
}
3739

0 commit comments

Comments
 (0)