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

Unified Diff: pkg/analyzer_cli/lib/src/analyzer_impl.dart

Issue 2108823002: fix #26122, classify strong mode errors correctly (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix expectations, remove unncessary code in CLI/server Created 4 years, 6 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 | « pkg/analyzer/test/src/task/strong/inferred_type_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/lib/src/analyzer_impl.dart
diff --git a/pkg/analyzer_cli/lib/src/analyzer_impl.dart b/pkg/analyzer_cli/lib/src/analyzer_impl.dart
index 12b39dff3279f04baaf70d4670bd52be1d654690..da846c2b7eb33eb972052d95a6d96c84579b7e87 100644
--- a/pkg/analyzer_cli/lib/src/analyzer_impl.dart
+++ b/pkg/analyzer_cli/lib/src/analyzer_impl.dart
@@ -259,14 +259,12 @@ class AnalyzerImpl {
static ErrorSeverity computeSeverity(
AnalysisError error, CommandLineOptions options,
[AnalysisContext context]) {
- bool isStrongMode = false;
if (context != null) {
ErrorProcessor processor = ErrorProcessor.getProcessor(context, error);
// If there is a processor for this error, defer to it.
if (processor != null) {
return processor.severity;
}
- isStrongMode = context.analysisOptions.strongMode;
}
if (!options.enableTypeChecks &&
@@ -276,10 +274,6 @@ class AnalyzerImpl {
return ErrorSeverity.ERROR;
} else if (options.lintsAreFatal && error.errorCode is LintCode) {
return ErrorSeverity.ERROR;
- } else if (isStrongMode &&
- error is StaticWarningCode &&
- (error as StaticWarningCode).isStrongModeError) {
- return ErrorSeverity.ERROR;
}
return error.errorCode.errorSeverity;
}
« no previous file with comments | « pkg/analyzer/test/src/task/strong/inferred_type_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698