Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Unified Diff: pkg/compiler/lib/src/compiler.dart

Issue 1415463022: Use DiagnosticMessage in MockCompiler. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 95d33a5e4a5dac8bd19a702dc4b68dd3a9792e3f..cd983fe414f486fc6b376cbc1186bc2e6eae2b71 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -1676,6 +1676,12 @@ class _CompilerDiagnosticReporter extends DiagnosticReporter {
void reportDiagnostic(DiagnosticMessage message,
List<DiagnosticMessage> infos,
api.Diagnostic kind) {
+ if (kind == api.Diagnostic.ERROR ||
+ kind == api.Diagnostic.CRASH ||
+ (options.fatalWarnings &&
+ kind == api.Diagnostic.WARNING)) {
+ compiler.compilationFailed = true;
+ }
compiler.reportDiagnostic(message, infos, kind);
}

Powered by Google App Engine
This is Rietveld 408576698