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 = |