[analysis_server] add a quick fix for `AMBIGUOUS_EXTENSION_MEMBER_ACCESS`

Fixes #49489

Change-Id: I49b34dd267a2b3b9e6639c3857de546d9f9995d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/252583
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_extension_override.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_extension_override.dart
new file mode 100644
index 0000000..c56b442
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_extension_override.dart
@@ -0,0 +1,65 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/dart/abstract_producer.dart';
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/resolver/applicable_extensions.dart';
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+
+class AddExtensionOverride extends MultiCorrectionProducer {
+  @override
+  Stream<CorrectionProducer> get producers async* {
+    final node = this.node;
+    if (node is! SimpleIdentifier) return;
+    final parent = node.parent;
+    if (parent is! PropertyAccess) return;
+    var target = parent.target;
+    if (target == null) return;
+
+    var extensions =
+        libraryElement.accessibleExtensions.hasMemberWithBaseName(node.name);
+    for (var extension in extensions) {
+      var name = extension.extension.name;
+      if (name != null) {
+        yield _AddOverride(target, name);
+      }
+    }
+  }
+}
+
+/// A correction processor that can make one of the possible changes computed by
+/// the [AddExtensionOverride] producer.
+class _AddOverride extends CorrectionProducer {
+  /// The expression around which to add the override.
+  final Expression _expression;
+
+  /// The extension name to be inserted.
+  final String _name;
+
+  _AddOverride(this._expression, this._name);
+
+  @override
+  List<Object> get fixArguments => [_name];
+
+  @override
+  FixKind get fixKind => DartFixKind.ADD_EXTENSION_OVERRIDE;
+
+  @override
+  Future<void> compute(ChangeBuilder builder) async {
+    var needsParentheses = _expression is! ParenthesizedExpression;
+    await builder.addDartFileEdit(file, (builder) {
+      builder.addInsertion(_expression.offset, (builder) {
+        builder.write(_name);
+        if (needsParentheses) {
+          builder.write('(');
+        }
+      });
+      if (needsParentheses) {
+        builder.addSimpleInsertion(_expression.end, ')');
+      }
+    });
+  }
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_missing_parameter.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_missing_parameter.dart
index 954bf68..83cf945 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_missing_parameter.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_missing_parameter.dart
@@ -38,7 +38,7 @@
   }
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [AddMissingParameter] producer.
 class _AddMissingOptionalPositionalParameter extends _AddMissingParameter {
   _AddMissingOptionalPositionalParameter(super.context);
@@ -60,7 +60,7 @@
   }
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [AddMissingParameter] producer.
 abstract class _AddMissingParameter extends CorrectionProducer {
   ExecutableParameters context;
@@ -93,7 +93,7 @@
   }
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [AddMissingParameter] producer.
 class _AddMissingRequiredPositionalParameter extends _AddMissingParameter {
   _AddMissingRequiredPositionalParameter(super.context);
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_not_null_assert.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_not_null_assert.dart
index f0510f3..2e3efaac 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_not_null_assert.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_not_null_assert.dart
@@ -70,8 +70,8 @@
         // adding the statement to the beginning of the list, special casing
         // when there are no statements (or when there's a single statement
         // and the whole block is on the same line).
-        var offset = min(utils.getLineNext(body_final.beginToken.offset),
-            body_final.endToken.offset);
+        var offset = min(
+            utils.getLineNext(body_final.offset), body_final.endToken.offset);
         builder.addSimpleInsertion(
             offset, '$prefix${indent}assert($id != null);$eol');
       });
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_required_keyword.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_required_keyword.dart
index 7a7b402..f0c969f 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_required_keyword.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_required_keyword.dart
@@ -28,8 +28,7 @@
       if (metadata.isNotEmpty) {
         for (var annotation in metadata) {
           if (annotation.elementAnnotation!.isRequired) {
-            var length =
-                annotation.endToken.next!.offset - annotation.beginToken.offset;
+            var length = annotation.endToken.next!.offset - annotation.offset;
             builder.addDeletion(SourceRange(annotation.offset, length));
             break;
           }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/add_super_constructor_invocation.dart b/pkg/analysis_server/lib/src/services/correction/dart/add_super_constructor_invocation.dart
index b5553aa..380357f 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/add_super_constructor_invocation.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/add_super_constructor_invocation.dart
@@ -50,7 +50,7 @@
   }
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [AddSuperConstructorInvocation] producer.
 class _AddInvocation extends CorrectionProducer {
   /// The constructor to be invoked.
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/change_argument_name.dart b/pkg/analysis_server/lib/src/services/correction/dart/change_argument_name.dart
index fc50a38..5c05976 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/change_argument_name.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/change_argument_name.dart
@@ -71,7 +71,7 @@
   }
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [ChangeArgumentName] producer.
 class _ChangeName extends CorrectionProducer {
   /// The name of the argument being changed.
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/create_constructor_super.dart b/pkg/analysis_server/lib/src/services/correction/dart/create_constructor_super.dart
index 498da4c..22ebecb 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/create_constructor_super.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/create_constructor_super.dart
@@ -40,7 +40,7 @@
   }
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [CreateConstructorSuper] producer.
 class _CreateConstructor extends CorrectionProducer {
   /// The constructor to be invoked.
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/data_driven.dart b/pkg/analysis_server/lib/src/services/correction/dart/data_driven.dart
index 0512f36..09cc969 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/data_driven.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/data_driven.dart
@@ -66,7 +66,7 @@
   }
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [DataDriven] producer.
 class DataDrivenFix extends CorrectionProducer {
   /// The transform being applied to implement this fix.
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/flutter_convert_to_stateless_widget.dart b/pkg/analysis_server/lib/src/services/correction/dart/flutter_convert_to_stateless_widget.dart
index ff11699..68b1fe1 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/flutter_convert_to_stateless_widget.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/flutter_convert_to_stateless_widget.dart
@@ -343,7 +343,7 @@
         var target = parent.target;
         var operator = parent.operator;
         if (target != null && operator != null) {
-          var offset = target.beginToken.offset;
+          var offset = target.offset;
           var length = operator.end - offset;
           edits.add(SourceEdit(offset - linesRange.offset, length, ''));
         }
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/flutter_wrap.dart b/pkg/analysis_server/lib/src/services/correction/dart/flutter_wrap.dart
index 50f4251..bacec0c 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/flutter_wrap.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/flutter_wrap.dart
@@ -89,7 +89,7 @@
   }
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [FlutterWrap] producer.
 class _FlutterWrapCenter extends _WrapSingleWidget {
   _FlutterWrapCenter(super.widgetExpr);
@@ -104,7 +104,7 @@
   String get _parentLibraryUri => flutter.widgetsUri;
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [FlutterWrap] producer.
 class _FlutterWrapColumn extends _WrapMultipleWidgets {
   _FlutterWrapColumn(super.firstWidget, super.lastWidget);
@@ -116,7 +116,7 @@
   String get _parentClassName => 'Column';
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [FlutterWrap] producer.
 class _FlutterWrapContainer extends _WrapSingleWidget {
   _FlutterWrapContainer(super.widgetExpr);
@@ -131,7 +131,7 @@
   String get _parentLibraryUri => flutter.widgetsUri;
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [FlutterWrap] producer.
 class _FlutterWrapGeneric extends _WrapSingleWidget {
   _FlutterWrapGeneric(super.widgetExpr);
@@ -140,7 +140,7 @@
   AssistKind get assistKind => DartAssistKind.FLUTTER_WRAP_GENERIC;
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [FlutterWrap] producer.
 class _FlutterWrapPadding extends _WrapSingleWidget {
   _FlutterWrapPadding(super.widgetExpr);
@@ -161,7 +161,7 @@
   String get _parentLibraryUri => flutter.widgetsUri;
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [FlutterWrap] producer.
 class _FlutterWrapRow extends _WrapMultipleWidgets {
   _FlutterWrapRow(super.firstWidget, super.lastWidget);
@@ -173,7 +173,7 @@
   String get _parentClassName => 'Row';
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [FlutterWrap] producer.
 class _FlutterWrapSizedBox extends _WrapSingleWidget {
   _FlutterWrapSizedBox(super.widgetExpr);
@@ -188,7 +188,7 @@
   String get _parentLibraryUri => flutter.widgetsUri;
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [FlutterWrap] producer.
 abstract class _WrapMultipleWidgets extends CorrectionProducer {
   final Expression firstWidget;
@@ -245,7 +245,7 @@
   }
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [FlutterWrap] producer.
 abstract class _WrapSingleWidget extends CorrectionProducer {
   final Expression widgetExpr;
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/make_variable_nullable.dart b/pkg/analysis_server/lib/src/services/correction/dart/make_variable_nullable.dart
index 5181b0a..9aa33b5 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/make_variable_nullable.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/make_variable_nullable.dart
@@ -121,7 +121,7 @@
       _variableName = parameter.name.lexeme;
       await builder.addDartFileEdit(file, (builder) {
         // Add '?' after `)`.
-        builder.addSimpleInsertion(parameter.endToken.end, '?');
+        builder.addSimpleInsertion(parameter.end, '?');
       });
     } else {
       var type = parameter.type;
@@ -144,7 +144,7 @@
     _variableName = parameter.name.lexeme;
     await builder.addDartFileEdit(file, (builder) {
       // Add '?' after `)`.
-      builder.addSimpleInsertion(parameter.endToken.end, '?');
+      builder.addSimpleInsertion(parameter.end, '?');
     });
   }
 
@@ -177,7 +177,7 @@
       _variableName = parameter.name.lexeme;
       await builder.addDartFileEdit(file, (builder) {
         // Add '?' after `)`.
-        builder.addSimpleInsertion(parameter.endToken.end, '?');
+        builder.addSimpleInsertion(parameter.end, '?');
       });
     } else {
       var type = parameter.type;
diff --git a/pkg/analysis_server/lib/src/services/correction/dart/surround_with.dart b/pkg/analysis_server/lib/src/services/correction/dart/surround_with.dart
index fd88d0d..5e324e8 100644
--- a/pkg/analysis_server/lib/src/services/correction/dart/surround_with.dart
+++ b/pkg/analysis_server/lib/src/services/correction/dart/surround_with.dart
@@ -70,7 +70,7 @@
   }
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [SurroundWith] producer.
 abstract class _SurroundWith extends CorrectionProducer {
   final SourceRange statementsRange;
@@ -85,7 +85,7 @@
       this.statementsRange, this.indentOld, this.indentNew, this.indentedCode);
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [SurroundWith] producer.
 class _SurroundWithBlock extends _SurroundWith {
   _SurroundWithBlock(super.statementsRange, super.indentOld, super.indentNew,
@@ -107,7 +107,7 @@
   }
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [SurroundWith] producer.
 class _SurroundWithDoWhile extends _SurroundWith {
   _SurroundWithDoWhile(super.statementsRange, super.indentOld, super.indentNew,
@@ -135,7 +135,7 @@
   }
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [SurroundWith] producer.
 class _SurroundWithFor extends _SurroundWith {
   _SurroundWithFor(super.statementsRange, super.indentOld, super.indentNew,
@@ -169,7 +169,7 @@
   }
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [SurroundWith] producer.
 class _SurroundWithForIn extends _SurroundWith {
   _SurroundWithForIn(super.statementsRange, super.indentOld, super.indentNew,
@@ -199,7 +199,7 @@
   }
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [SurroundWith] producer.
 class _SurroundWithIf extends _SurroundWith {
   _SurroundWithIf(super.statementsRange, super.indentOld, super.indentNew,
@@ -227,7 +227,7 @@
   }
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [SurroundWith] producer.
 class _SurroundWithSetState extends _SurroundWith {
   _SurroundWithSetState(super.statementsRange, super.indentOld, super.indentNew,
@@ -256,7 +256,7 @@
   }
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [SurroundWith] producer.
 class _SurroundWithTryCatch extends _SurroundWith {
   _SurroundWithTryCatch(super.statementsRange, super.indentOld, super.indentNew,
@@ -294,7 +294,7 @@
   }
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [SurroundWith] producer.
 class _SurroundWithTryFinally extends _SurroundWith {
   _SurroundWithTryFinally(super.statementsRange, super.indentOld,
@@ -330,7 +330,7 @@
   }
 }
 
-/// A correction processor that can make one of the possible change computed by
+/// A correction processor that can make one of the possible changes computed by
 /// the [SurroundWith] producer.
 class _SurroundWithWhile extends _SurroundWith {
   _SurroundWithWhile(super.statementsRange, super.indentOld, super.indentNew,
diff --git a/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml b/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
index 9967293..5e835ff 100644
--- a/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
+++ b/pkg/analysis_server/lib/src/services/correction/error_fix_status.yaml
@@ -102,9 +102,7 @@
   notes: |-
     For each exported name, add a fix to hide the name.
 CompileTimeErrorCode.AMBIGUOUS_EXTENSION_MEMBER_ACCESS:
-  status: needsFix
-  notes: |-
-    For each extension, add a fix to add an extension override.
+  status: hasFix
 CompileTimeErrorCode.AMBIGUOUS_IMPORT:
   status: needsFix
   notes: |-
diff --git a/pkg/analysis_server/lib/src/services/correction/fix.dart b/pkg/analysis_server/lib/src/services/correction/fix.dart
index df9a57f..b1e74ea 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix.dart
@@ -138,6 +138,11 @@
     DartFixKindPriority.DEFAULT,
     'Add EOL at end of file',
   );
+  static const ADD_EXTENSION_OVERRIDE = FixKind(
+    'dart.fix.add.extensionOverride',
+    DartFixKindPriority.DEFAULT,
+    "Add an extension override for '{0}'",
+  );
   static const ADD_FIELD_FORMAL_PARAMETERS = FixKind(
     'dart.fix.add.fieldFormalParameters',
     70,
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 0b9cd4f..87bb753 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -14,6 +14,7 @@
 import 'package:analysis_server/src/services/correction/dart/add_enum_constant.dart';
 import 'package:analysis_server/src/services/correction/dart/add_eol_at_end_of_file.dart';
 import 'package:analysis_server/src/services/correction/dart/add_explicit_cast.dart';
+import 'package:analysis_server/src/services/correction/dart/add_extension_override.dart';
 import 'package:analysis_server/src/services/correction/dart/add_field_formal_parameters.dart';
 import 'package:analysis_server/src/services/correction/dart/add_key_to_constructors.dart';
 import 'package:analysis_server/src/services/correction/dart/add_late.dart';
@@ -716,6 +717,9 @@
   /// generators used for lint rules are in the [lintMultiProducerMap].
   static const Map<ErrorCode, List<MultiProducerGenerator>>
       nonLintMultiProducerMap = {
+    CompileTimeErrorCode.AMBIGUOUS_EXTENSION_MEMBER_ACCESS: [
+      AddExtensionOverride.new,
+    ],
     CompileTimeErrorCode.CAST_TO_NON_TYPE: [
       ImportLibrary.forType,
     ],
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_extension_override_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_extension_override_test.dart
new file mode 100644
index 0000000..6e3f949
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_extension_override_test.dart
@@ -0,0 +1,114 @@
+// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+void main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AddExtensionOverrideTest);
+  });
+}
+
+@reflectiveTest
+class AddExtensionOverrideTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.ADD_EXTENSION_OVERRIDE;
+
+  Future<void> test_no_name() async {
+    await resolveTestCode('''
+extension E on int {
+  int get a => 1;
+}
+extension on int {
+  set a(int v) {}
+}
+f() {
+  0.a;
+}
+''');
+    await assertHasFix('''
+extension E on int {
+  int get a => 1;
+}
+extension on int {
+  set a(int v) {}
+}
+f() {
+  E(0).a;
+}
+''', expectedNumberOfFixesForKind: 1, errorFilter: (error) {
+      return error.errorCode ==
+          CompileTimeErrorCode.AMBIGUOUS_EXTENSION_MEMBER_ACCESS;
+    });
+  }
+
+  Future<void> test_no_parentheses() async {
+    await resolveTestCode('''
+extension E on int {
+  int get a => 1;
+}
+extension E2 on int {
+  set a(int v) {}
+}
+f() {
+  0.a;
+}
+''');
+    await assertHasFix('''
+extension E on int {
+  int get a => 1;
+}
+extension E2 on int {
+  set a(int v) {}
+}
+f() {
+  E(0).a;
+}
+''');
+
+    await assertHasFixesWithoutApplying(
+        expectedNumberOfFixesForKind: 2,
+        matchFixMessages: [
+          "Add an extension override for 'E'",
+          "Add an extension override for 'E2'",
+        ]);
+  }
+
+  Future<void> test_parentheses() async {
+    await resolveTestCode('''
+extension E on int {
+  int get a => 1;
+}
+extension E2 on int {
+  set a(int v) {}
+}
+f() {
+  (0).a;
+}
+''');
+    await assertHasFix('''
+extension E on int {
+  int get a => 1;
+}
+extension E2 on int {
+  set a(int v) {}
+}
+f() {
+  E(0).a;
+}
+''');
+
+    await assertHasFixesWithoutApplying(
+        expectedNumberOfFixesForKind: 2,
+        matchFixMessages: [
+          "Add an extension override for 'E'",
+          "Add an extension override for 'E2'",
+        ]);
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/test_all.dart b/pkg/analysis_server/test/src/services/correction/fix/test_all.dart
index 2760dbe..4ff4686 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/test_all.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/test_all.dart
@@ -14,6 +14,7 @@
 import 'add_enum_constant_test.dart' as add_enum_constant_test;
 import 'add_eol_at_end_of_file_test.dart' as add_eol_at_end_of_file;
 import 'add_explicit_cast_test.dart' as add_explicit_cast;
+import 'add_extension_override_test.dart' as add_extension_override;
 import 'add_field_formal_parameters_test.dart' as add_field_formal_parameters;
 import 'add_key_to_constructors_test.dart' as add_key_to_constructors;
 import 'add_late_test.dart' as add_late;
@@ -252,6 +253,7 @@
     add_enum_constant_test.main();
     add_eol_at_end_of_file.main();
     add_explicit_cast.main();
+    add_extension_override.main();
     add_field_formal_parameters.main();
     add_key_to_constructors.main();
     add_late.main();