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

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

Issue 1489823003: Check types in '_addFix_createConstructorSuperExplicit'. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 5dc5c2df0601534fdccdf9239b89356d1e03ebd7..e00e4fd62811be4a2ea73804b3a810edff097f11 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -752,6 +752,10 @@ class FixProcessor {
}
void _addFix_createConstructorSuperExplicit() {
+ if (node.parent is! ConstructorDeclaration ||
+ node.parent.parent is! ClassDeclaration) {
+ return;
+ }
ConstructorDeclaration targetConstructor =
node.parent as ConstructorDeclaration;
ClassDeclaration targetClassNode =
« 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