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

Unified Diff: lib/src/compiler.dart

Issue 1554683002: Update to latest analyzer (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 11 months 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
« no previous file with comments | « lib/src/codegen/side_effect_analysis.dart ('k') | lib/src/report.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/compiler.dart
diff --git a/lib/src/compiler.dart b/lib/src/compiler.dart
index acf5494ed5505fdecc2413c79a29819afe8650d5..9e4281ae33bcbf20e1bbdfbd76a326006bf2340d 100644
--- a/lib/src/compiler.dart
+++ b/lib/src/compiler.dart
@@ -33,6 +33,7 @@ import 'info.dart'
import 'options.dart';
import 'report.dart';
import 'report/html_reporter.dart';
+import 'utils.dart' show isStrongModeError;
/// Sets up the type checker logger to print a span that highlights error
/// messages.
@@ -454,18 +455,18 @@ abstract class AbstractCompiler {
List<AnalysisError> errors = errorContext.computeErrors(source);
bool failure = false;
for (var error in errors) {
+ ErrorCode code = error.errorCode;
// Always skip TODOs.
- if (error.errorCode.type == ErrorType.TODO) continue;
+ if (code.type == ErrorType.TODO) continue;
// TODO(jmesserly): for now, treat DDC errors as having a different
// error level from Analayzer ones.
- if (error.errorCode.name.startsWith('dev_compiler')) {
+ if (isStrongModeError(code)) {
reporter.onError(error);
- if (error.errorCode.errorSeverity == ErrorSeverity.ERROR) {
+ if (code.errorSeverity == ErrorSeverity.ERROR) {
failure = true;
}
- } else if (error.errorCode.errorSeverity.ordinal >=
- ErrorSeverity.WARNING.ordinal) {
+ } else if (code.errorSeverity.ordinal >= ErrorSeverity.WARNING.ordinal) {
// All analyzer warnings or errors are errors for DDC.
failure = true;
reporter.onError(error);
« no previous file with comments | « lib/src/codegen/side_effect_analysis.dart ('k') | lib/src/report.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698