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

Unified Diff: pkg/analysis_server/lib/src/services/correction/fix_internal.dart

Issue 2533043002: AnalysisErrorWithProperties cannot be reported with the new analysis driver. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/correction/fix_internal.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
index 1a886be1a06d946ff5b14673bdc32d68b9e69a99..1a521ff2c2cdbced260576a213ec67ee87cf0285 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -285,15 +285,15 @@ class FixProcessor {
.NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_FIVE_PLUS) {
// make class abstract
_addFix_makeEnclosingClassAbstract();
- // implement methods
- AnalysisErrorWithProperties errorWithProperties =
- error as AnalysisErrorWithProperties;
- Object property =
- errorWithProperties.getProperty(ErrorProperty.UNIMPLEMENTED_METHODS);
- List<ExecutableElement> missingOverrides =
- property as List<ExecutableElement>;
- _addFix_createMissingOverrides(missingOverrides);
_addFix_createNoSuchMethod();
+ // implement methods
+ if (error is AnalysisErrorWithProperties) {
Paul Berry 2016/11/28 18:41:35 Would you mind adding a "TODO" comment to remind u
scheglov 2016/11/28 18:44:13 Done.
+ AnalysisErrorWithProperties errorWithProperties =
+ error as AnalysisErrorWithProperties;
+ List<ExecutableElement> missingOverrides = errorWithProperties
+ .getProperty(ErrorProperty.UNIMPLEMENTED_METHODS);
+ _addFix_createMissingOverrides(missingOverrides);
+ }
}
if (errorCode == StaticWarningCode.CAST_TO_NON_TYPE ||
errorCode == StaticWarningCode.TYPE_TEST_WITH_UNDEFINED_NAME ||
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698