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

Unified Diff: pkg/analyzer/lib/source/error_processor.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/analysis_server/lib/src/protocol_server.dart ('k') | pkg/analyzer/lib/src/generated/error.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/source/error_processor.dart
diff --git a/pkg/analyzer/lib/source/error_processor.dart b/pkg/analyzer/lib/source/error_processor.dart
index 1fd9577ce6db07deac13b0d7aaa5767ff7f1a8c0..81778bcf688c6fa3d6a7e0757f00f7bd52f50881 100644
--- a/pkg/analyzer/lib/source/error_processor.dart
+++ b/pkg/analyzer/lib/source/error_processor.dart
@@ -121,6 +121,14 @@ class _StrongModeTypeErrorProcessor implements ErrorProcessor {
ErrorSeverity get severity => ErrorSeverity.ERROR;
/// Check if this processor applies to the given [error].
- bool appliesTo(AnalysisError error) =>
- error.errorCode.type == ErrorType.STATIC_TYPE_WARNING;
+ bool appliesTo(AnalysisError error) {
+ ErrorCode errorCode = error.errorCode;
+ if (errorCode is StaticTypeWarningCode) {
+ return true;
+ }
+ if (errorCode is StaticWarningCode) {
+ return errorCode.isStrongModeError;
+ }
+ return false;
+ }
}
« no previous file with comments | « pkg/analysis_server/lib/src/protocol_server.dart ('k') | pkg/analyzer/lib/src/generated/error.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698