[cfe] Delay adding builders to declarations

This is a step towards creating fragments instead of builders during outline building.

Change-Id: I8616c8d0fa751693af820ee4fa9078e7ac5d7f40
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/382800
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
diff --git a/pkg/front_end/lib/src/kernel/const_conditional_simplifier.dart b/pkg/front_end/lib/src/kernel/const_conditional_simplifier.dart
index 2cda07a..23e3148 100644
--- a/pkg/front_end/lib/src/kernel/const_conditional_simplifier.dart
+++ b/pkg/front_end/lib/src/kernel/const_conditional_simplifier.dart
@@ -146,14 +146,17 @@
   Constant? _evaluate(Expression node) =>
       evaluateOrNull(staticTypeContext, node, requireConstant: false);
 
-  // Coverage-ignore(suite): Not run.
   Constant? _evaluateFunctionInvocation(FunctionNode node) {
     if (node.typeParameters.isNotEmpty ||
+        // Coverage-ignore(suite): Not run.
         node.requiredParameterCount != 0 ||
+        // Coverage-ignore(suite): Not run.
         node.positionalParameters.isNotEmpty ||
+        // Coverage-ignore(suite): Not run.
         node.namedParameters.isNotEmpty) {
       return null;
     }
+    // Coverage-ignore-block(suite): Not run.
     Statement? body = node.body;
     if (body is! ReturnStatement) return null;
     Expression? expression = body.expression;
@@ -165,7 +168,6 @@
     // A function parameter can be declared final with an initializer, but
     // doesn't necessarily have the initializer's value.
     if (variable.parent is FunctionNode) return null;
-    // Coverage-ignore-block(suite): Not run.
     if (_shouldNotInline(variable)) return null;
     if (!variable.isFinal) return null;
     Expression? initializer = variable.initializer;
@@ -229,18 +231,15 @@
       _lookupLocalFunctionInvocation(node) ??
       super.visitLocalFunctionInvocation(node);
 
-  // Coverage-ignore(suite): Not run.
   Constant? _evaluateStaticInvocation(Procedure target) {
     if (_shouldNotInline(target)) return null;
     return _evaluateFunctionInvocation(target.function);
   }
 
-  // Coverage-ignore(suite): Not run.
   Constant? _lookupStaticInvocation(Procedure target) => _functionCache
       .putIfAbsent(target.function, () => _evaluateStaticInvocation(target));
 
   @override
-  // Coverage-ignore(suite): Not run.
   Constant visitStaticInvocation(StaticInvocation node) {
     return _lookupStaticInvocation(node.target) ??
         super.visitStaticInvocation(node);
diff --git a/pkg/front_end/lib/src/source/builder_factory.dart b/pkg/front_end/lib/src/source/builder_factory.dart
index b5aaced..74a60da 100644
--- a/pkg/front_end/lib/src/source/builder_factory.dart
+++ b/pkg/front_end/lib/src/source/builder_factory.dart
@@ -490,8 +490,7 @@
   void registerUnboundStructuralVariables(
       List<StructuralVariableBuilder> variableBuilders);
 
-  Builder addBuilder(String name, Builder declaration, int charOffset,
-      {Reference? getterReference, Reference? setterReference});
+  Builder addBuilder(String name, Builder declaration, int charOffset);
 }
 
 class NominalVariableCopy {
diff --git a/pkg/front_end/lib/src/source/source_builder_factory.dart b/pkg/front_end/lib/src/source/source_builder_factory.dart
index f5ed1db..5208c2c 100644
--- a/pkg/front_end/lib/src/source/source_builder_factory.dart
+++ b/pkg/front_end/lib/src/source/source_builder_factory.dart
@@ -191,8 +191,7 @@
     currentTypeParameterScopeBuilder =
         currentTypeParameterScopeBuilder.createNested(
             TypeParameterScopeKind.classOrNamedMixinApplication,
-            "class or mixin application",
-            true);
+            "class or mixin application");
 
     Map<String, NominalVariableBuilder> nominalParameterScope = {};
     _nominalParameterScopes.push(nominalParameterScope);
@@ -391,7 +390,7 @@
   @override
   void beginEnumDeclarationHeader(String name) {
     currentTypeParameterScopeBuilder = currentTypeParameterScopeBuilder
-        .createNested(TypeParameterScopeKind.enumDeclaration, name, true);
+        .createNested(TypeParameterScopeKind.enumDeclaration, name);
     Map<String, NominalVariableBuilder> nominalParameterScope = {};
     _nominalParameterScopes.push(nominalParameterScope);
     _typeScopes.push(new TypeScope(
@@ -478,8 +477,7 @@
     currentTypeParameterScopeBuilder =
         currentTypeParameterScopeBuilder.createNested(
             TypeParameterScopeKind.extensionOrExtensionTypeDeclaration,
-            "extension",
-            true);
+            "extension");
     Map<String, NominalVariableBuilder> nominalParameterScope = {};
     _nominalParameterScopes.push(nominalParameterScope);
     _typeScopes.push(new TypeScope(
@@ -584,9 +582,8 @@
 
   @override
   void beginFactoryMethod() {
-    currentTypeParameterScopeBuilder =
-        currentTypeParameterScopeBuilder.createNested(
-            TypeParameterScopeKind.factoryMethod, "#factory_method", false);
+    currentTypeParameterScopeBuilder = currentTypeParameterScopeBuilder
+        .createNested(TypeParameterScopeKind.factoryMethod, "#factory_method");
     Map<String, NominalVariableBuilder> nominalParameterScope = {};
     _nominalParameterScopes.push(nominalParameterScope);
     _typeScopes.push(new TypeScope(
@@ -631,7 +628,7 @@
   @override
   void beginConstructor() {
     currentTypeParameterScopeBuilder = currentTypeParameterScopeBuilder
-        .createNested(TypeParameterScopeKind.constructor, "#method", false);
+        .createNested(TypeParameterScopeKind.constructor, "#method");
     Map<String, NominalVariableBuilder> nominalParameterScope = {};
     _nominalParameterScopes.push(nominalParameterScope);
     _typeScopes.push(new TypeScope(
@@ -680,7 +677,7 @@
   @override
   void beginStaticMethod() {
     currentTypeParameterScopeBuilder = currentTypeParameterScopeBuilder
-        .createNested(TypeParameterScopeKind.staticMethod, "#method", false);
+        .createNested(TypeParameterScopeKind.staticMethod, "#method");
     Map<String, NominalVariableBuilder> nominalParameterScope = {};
     _nominalParameterScopes.push(nominalParameterScope);
     _typeScopes.push(new TypeScope(
@@ -727,7 +724,7 @@
   @override
   void beginInstanceMethod() {
     currentTypeParameterScopeBuilder = currentTypeParameterScopeBuilder
-        .createNested(TypeParameterScopeKind.instanceMethod, "#method", false);
+        .createNested(TypeParameterScopeKind.instanceMethod, "#method");
     Map<String, NominalVariableBuilder> nominalParameterScope = {};
     _nominalParameterScopes.push(nominalParameterScope);
     _typeScopes.push(new TypeScope(
@@ -776,7 +773,7 @@
   @override
   void beginTopLevelMethod() {
     currentTypeParameterScopeBuilder = currentTypeParameterScopeBuilder
-        .createNested(TypeParameterScopeKind.topLevelMethod, "#method", false);
+        .createNested(TypeParameterScopeKind.topLevelMethod, "#method");
     Map<String, NominalVariableBuilder> nominalParameterScope = {};
     _nominalParameterScopes.push(nominalParameterScope);
     _typeScopes.push(new TypeScope(
@@ -825,7 +822,7 @@
   @override
   void beginTypedef() {
     currentTypeParameterScopeBuilder = currentTypeParameterScopeBuilder
-        .createNested(TypeParameterScopeKind.typedef, "#typedef", false);
+        .createNested(TypeParameterScopeKind.typedef, "#typedef");
     Map<String, NominalVariableBuilder> nominalParameterScope = {};
     _nominalParameterScopes.push(nominalParameterScope);
     _typeScopes.push(new TypeScope(
@@ -871,9 +868,8 @@
 
   @override
   void beginFunctionType() {
-    currentTypeParameterScopeBuilder =
-        currentTypeParameterScopeBuilder.createNested(
-            TypeParameterScopeKind.functionType, "#function_type", false);
+    currentTypeParameterScopeBuilder = currentTypeParameterScopeBuilder
+        .createNested(TypeParameterScopeKind.functionType, "#function_type");
     Map<String, StructuralVariableBuilder> structuralParameterScope = {};
     _structuralParameterScopes.push(structuralParameterScope);
     _typeScopes.push(new TypeScope(
@@ -903,8 +899,7 @@
     currentTypeParameterScopeBuilder =
         currentTypeParameterScopeBuilder.createNested(
             TypeParameterScopeKind.unnamedMixinApplication,
-            "mixin application",
-            false);
+            "mixin application");
     Map<String, NominalVariableBuilder> nominalParameterScope = {};
     _nominalParameterScopes.push(nominalParameterScope);
     _typeScopes.push(new TypeScope(
@@ -1284,7 +1279,7 @@
 
     _constructorReferences.clear();
 
-    addBuilder(name, enumBuilder, charOffset,
+    _addBuilderInternal(name, enumBuilder, charOffset,
         getterReference: referencesFromIndexedClass?.cls.reference);
 
     offsetMap.registerNamedDeclaration(identifier, enumBuilder);
@@ -1425,7 +1420,7 @@
 
     _constructorReferences.clear();
 
-    addBuilder(className, classBuilder, nameOffset,
+    _addBuilderInternal(className, classBuilder, nameOffset,
         getterReference: _indexedContainer?.reference);
     offsetMap.registerNamedDeclaration(identifier, classBuilder);
   }
@@ -1700,7 +1695,7 @@
         // pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart can't
         // handle that :(
         application.cls.isAnonymousMixin = !isNamedMixinApplication;
-        addBuilder(fullname, application, charOffset,
+        _addBuilderInternal(fullname, application, charOffset,
             getterReference: referencesFromIndexedClass?.cls.reference);
         supertype = new NamedTypeBuilderImpl.fromTypeDeclarationBuilder(
             application, const NullabilityBuilder.omitted(),
@@ -1778,7 +1773,7 @@
     _declarationBuilderScopes.pop().declarationBuilder = extensionBuilder;
     _constructorReferences.clear();
 
-    addBuilder(extensionBuilder.name, extensionBuilder, nameOffset,
+    _addBuilderInternal(extensionBuilder.name, extensionBuilder, nameOffset,
         getterReference: referenceFrom?.reference);
     if (identifier != null) {
       offsetMap.registerNamedDeclaration(identifier, extensionBuilder);
@@ -1842,7 +1837,7 @@
         extensionTypeDeclarationBuilder;
     _constructorReferences.clear();
 
-    addBuilder(extensionTypeDeclarationBuilder.name,
+    _addBuilderInternal(extensionTypeDeclarationBuilder.name,
         extensionTypeDeclarationBuilder, identifier.nameOffset,
         getterReference: indexedContainer?.reference);
     offsetMap.registerNamedDeclaration(
@@ -1870,7 +1865,7 @@
         ownerName: name, allowNameConflict: true);
     // Nested declaration began in `OutlineBuilder.beginFunctionTypeAlias`.
     endTypedef();
-    addBuilder(name, typedefBuilder, charOffset,
+    _addBuilderInternal(name, typedefBuilder, charOffset,
         getterReference: referenceFrom?.reference);
   }
 
@@ -2030,7 +2025,7 @@
     _checkTypeVariables(typeVariables,
         ownerName: constructorBuilder.name, allowNameConflict: true);
     // TODO(johnniwinther): There is no way to pass the tear off reference here.
-    addBuilder(constructorName, constructorBuilder, charOffset,
+    _addBuilderInternal(constructorName, constructorBuilder, charOffset,
         getterReference: constructorReference);
     if (nativeMethodName != null) {
       _addNativeMethod(constructorBuilder);
@@ -2202,7 +2197,7 @@
     _checkTypeVariables(typeVariables,
         ownerName: identifier.name, allowNameConflict: true);
 
-    addBuilder(procedureName, procedureBuilder, charOffset,
+    _addBuilderInternal(procedureName, procedureBuilder, charOffset,
         getterReference: constructorReference);
     if (nativeMethodName != null) {
       _addNativeMethod(procedureBuilder);
@@ -2359,7 +2354,7 @@
         nativeMethodName: nativeMethodName);
     _checkTypeVariables(typeVariables,
         ownerName: procedureBuilder.name, allowNameConflict: true);
-    addBuilder(name, procedureBuilder, charOffset,
+    _addBuilderInternal(name, procedureBuilder, charOffset,
         getterReference: procedureReference);
     if (nativeMethodName != null) {
       _addNativeMethod(procedureBuilder);
@@ -2537,7 +2532,7 @@
         lateSetterReference: lateSetterReference,
         initializerToken: initializerToken,
         constInitializerToken: constInitializerToken);
-    addBuilder(name, fieldBuilder, charOffset,
+    _addBuilderInternal(name, fieldBuilder, charOffset,
         getterReference: fieldGetterReference,
         setterReference: fieldSetterReference);
     return fieldBuilder;
@@ -2829,51 +2824,60 @@
   }
 
   @override
-  Builder addBuilder(String name, Builder declaration, int charOffset,
+  Builder addBuilder(String name, Builder declaration, int charOffset) {
+    return _addBuilderToLibrary(name, declaration, charOffset);
+  }
+
+  void _addBuilderInternal(String name, Builder declaration, int charOffset,
       {Reference? getterReference, Reference? setterReference}) {
-    // TODO(ahe): Set the parent correctly here. Could then change the
-    // implementation of MemberBuilder.isTopLevel to test explicitly for a
-    // LibraryBuilder.
-    if (declaration is SourceExtensionBuilder &&
-        declaration.isUnnamedExtension) {
-      assert(currentTypeParameterScopeBuilder ==
-          _libraryTypeParameterScopeBuilder);
-      declaration.parent = _parent;
-      currentTypeParameterScopeBuilder.extensions!.add(declaration);
-      return declaration;
-    }
     if (getterReference != null) {
       loader.buildersCreatedWithReferences[getterReference] = declaration;
     }
     if (setterReference != null) {
       loader.buildersCreatedWithReferences[setterReference] = declaration;
     }
+    _addBuilder(name, declaration, charOffset);
+  }
+
+  void _addBuilder(String name, Builder declaration, int charOffset) {
     if (currentTypeParameterScopeBuilder == _libraryTypeParameterScopeBuilder) {
-      if (declaration is MemberBuilder) {
-        declaration.parent = _parent;
-      } else if (declaration is TypeDeclarationBuilder) {
-        declaration.parent = _parent;
-      } else if (declaration is PrefixBuilder) {
-        assert(declaration.parent == _parent);
-      } else {
-        return unhandled("${declaration.runtimeType}", "addBuilder", charOffset,
-            _compilationUnit.fileUri);
-      }
+      _addBuilderToLibrary(name, declaration, charOffset);
     } else {
-      assert(currentTypeParameterScopeBuilder.parent ==
-          _libraryTypeParameterScopeBuilder);
+      _addBuilderToDeclaration(name, declaration, charOffset);
     }
-    bool isConstructor = declaration is FunctionBuilder &&
-        (declaration.isConstructor || declaration.isFactory);
-    if (!isConstructor && name == currentTypeParameterScopeBuilder.name) {
-      _problemReporting.addProblem(messageMemberWithSameNameAsClass, charOffset,
-          noLength, _compilationUnit.fileUri);
+  }
+
+  Builder _addBuilderToLibrary(
+      String name, Builder declaration, int charOffset) {
+    assert(
+        currentTypeParameterScopeBuilder == _libraryTypeParameterScopeBuilder);
+    if (declaration is SourceExtensionBuilder &&
+        declaration.isUnnamedExtension) {
+      declaration.parent = _parent;
+      currentTypeParameterScopeBuilder.extensions!.add(declaration);
+      return declaration;
     }
-    Map<String, Builder> members = isConstructor
-        ? currentTypeParameterScopeBuilder.constructors!
-        : (declaration.isSetter
-            ? currentTypeParameterScopeBuilder.setters!
-            : currentTypeParameterScopeBuilder.members!);
+
+    if (declaration is MemberBuilder) {
+      declaration.parent = _parent;
+    } else if (declaration is TypeDeclarationBuilder) {
+      declaration.parent = _parent;
+    } else if (declaration is PrefixBuilder) {
+      assert(declaration.parent == _parent);
+    } else {
+      return unhandled("${declaration.runtimeType}", "addBuilder", charOffset,
+          _compilationUnit.fileUri);
+    }
+
+    assert(
+        !(declaration is FunctionBuilder &&
+            (declaration.isConstructor || declaration.isFactory)),
+        // Coverage-ignore(suite): Not run.
+        "Unexpected constructor in library: $declaration.");
+
+    Map<String, Builder> members = declaration.isSetter
+        ? currentTypeParameterScopeBuilder.setters!
+        : currentTypeParameterScopeBuilder.members!;
 
     Builder? existing = members[name];
 
@@ -2915,15 +2919,8 @@
       existing.mergeScopes(declaration, _problemReporting, _nameSpace,
           uriOffset: new UriOffset(_compilationUnit.fileUri, charOffset));
       return existing;
-    } else if (_isDuplicatedDeclaration(existing, declaration)) {
+    } else if (isDuplicatedDeclaration(existing, declaration)) {
       String fullName = name;
-      if (isConstructor) {
-        if (name.isEmpty) {
-          fullName = currentTypeParameterScopeBuilder.name;
-        } else {
-          fullName = "${currentTypeParameterScopeBuilder.name}.$name";
-        }
-      }
       _problemReporting.addProblem(
           templateDuplicatedDeclaration.withArguments(fullName),
           charOffset,
@@ -2960,26 +2957,13 @@
     return members[name] = declaration;
   }
 
-  bool _isDuplicatedDeclaration(Builder? existing, Builder other) {
-    if (existing == null) return false;
-    if (other.isAugment) return false;
-    Builder? next = existing.next;
-    if (next == null) {
-      if (existing.isGetter && other.isSetter) return false;
-      if (existing.isSetter && other.isGetter) return false;
-    } else {
-      if (next is ClassBuilder && !next.isMixinApplication) return true;
-    }
-    if (existing is ClassBuilder && other is ClassBuilder) {
-      // We allow multiple mixin applications with the same name. An
-      // alternative is to share these mixin applications. This situation can
-      // happen if you have `class A extends Object with Mixin {}` and `class B
-      // extends Object with Mixin {}` in the same library.
-      return !existing.isMixinApplication ||
-          // Coverage-ignore(suite): Not run.
-          !other.isMixinApplication;
-    }
-    return true;
+  void _addBuilderToDeclaration(
+      String name, Builder declaration, int charOffset) {
+    assert(currentTypeParameterScopeBuilder.parent ==
+        _libraryTypeParameterScopeBuilder);
+
+    currentTypeParameterScopeBuilder.addBuilderToDeclaration(
+        name, declaration, _compilationUnit.fileUri, charOffset);
   }
 
   @override
diff --git a/pkg/front_end/lib/src/source/source_class_builder.dart b/pkg/front_end/lib/src/source/source_class_builder.dart
index 7a13c9e..a214da6 100644
--- a/pkg/front_end/lib/src/source/source_class_builder.dart
+++ b/pkg/front_end/lib/src/source/source_class_builder.dart
@@ -212,7 +212,7 @@
 
   @override
   void buildScopes(LibraryBuilder coreLibrary) {
-    _nameSpace = nameSpaceBuilder.buildNameSpace(this);
+    _nameSpace = nameSpaceBuilder.buildNameSpace(libraryBuilder, this);
     _scope = new NameSpaceLookupScope(
         _nameSpace, ScopeKind.declaration, "class $name",
         parent: typeParameterScope);
diff --git a/pkg/front_end/lib/src/source/source_enum_builder.dart b/pkg/front_end/lib/src/source/source_enum_builder.dart
index fa318b8..96e5c3b 100644
--- a/pkg/front_end/lib/src/source/source_enum_builder.dart
+++ b/pkg/front_end/lib/src/source/source_enum_builder.dart
@@ -157,8 +157,8 @@
 
   @override
   void buildScopes(LibraryBuilder coreLibrary) {
-    _createSynthesizedMembers(coreLibrary);
     super.buildScopes(coreLibrary);
+    _createSynthesizedMembers(coreLibrary);
 
     Iterator<MemberBuilder> iterator =
         nameSpace.filteredConstructorNameIterator(
@@ -279,7 +279,7 @@
     }
 
     Builder? customValuesDeclaration =
-        nameSpaceBuilder.lookupLocalMember("values", setter: false);
+        nameSpace.lookupLocalMember("values", setter: false);
     if (customValuesDeclaration != null) {
       // Retrieve the earliest declaration for error reporting.
       while (customValuesDeclaration?.next != null) {
@@ -297,7 +297,7 @@
       "hashCode",
       "=="
     ]) {
-      Builder? customIndexDeclaration = nameSpaceBuilder
+      Builder? customIndexDeclaration = nameSpace
           .lookupLocalMember(restrictedInstanceMemberName, setter: false);
       if (customIndexDeclaration is MemberBuilder &&
           !customIndexDeclaration.isAbstract) {
@@ -332,14 +332,22 @@
         isSynthesized: true);
     if (customValuesDeclaration != null) {
       customValuesDeclaration.next = valuesBuilder;
+      nameSpaceBuilder.checkTypeVariableConflict(libraryBuilder,
+          valuesBuilder.name, valuesBuilder, valuesBuilder.fileUri);
+      valuesBuilder.parent = this;
     } else {
-      nameSpaceBuilder.addLocalMember("values", valuesBuilder, setter: false);
+      nameSpace.addLocalMember("values", valuesBuilder, setter: false);
+      nameSpaceBuilder.checkTypeVariableConflict(libraryBuilder,
+          valuesBuilder.name, valuesBuilder, valuesBuilder.fileUri);
+      valuesBuilder.parent = this;
     }
 
     // The default constructor is added if no generative or unnamed factory
     // constructors are declared.
     bool needsSynthesizedDefaultConstructor = true;
-    for (MemberBuilder constructorBuilder in nameSpaceBuilder.constructors) {
+    Iterator<MemberBuilder> iterator = nameSpace.unfilteredConstructorIterator;
+    while (iterator.moveNext()) {
+      MemberBuilder constructorBuilder = iterator.current;
       if (!constructorBuilder.isFactory || constructorBuilder.name == "") {
         needsSynthesizedDefaultConstructor = false;
         break;
@@ -372,8 +380,13 @@
               isSynthetic: true);
       synthesizedDefaultConstructorBuilder!
           .registerInitializedField(valuesBuilder);
-      nameSpaceBuilder.addConstructor(
-          "", synthesizedDefaultConstructorBuilder!);
+      nameSpace.addConstructor("", synthesizedDefaultConstructorBuilder!);
+      nameSpaceBuilder.checkTypeVariableConflict(
+          libraryBuilder,
+          synthesizedDefaultConstructorBuilder!.name,
+          synthesizedDefaultConstructorBuilder!,
+          synthesizedDefaultConstructorBuilder!.fileUri);
+      synthesizedDefaultConstructorBuilder!.parent = this;
     }
 
     ProcedureBuilder toStringBuilder = new SourceProcedureBuilder(
@@ -399,8 +412,11 @@
             containerType: ContainerType.Class,
             libraryName: new LibraryName(coreLibrary.library.reference)),
         isSynthetic: true);
-    nameSpaceBuilder.addLocalMember("_enumToString", toStringBuilder,
-        setter: false);
+    nameSpace.addLocalMember("_enumToString", toStringBuilder, setter: false);
+    nameSpaceBuilder.checkTypeVariableConflict(libraryBuilder,
+        toStringBuilder.name, toStringBuilder, toStringBuilder.fileUri!);
+    toStringBuilder.parent = this;
+
     String className = name;
 
     if (enumConstantInfos != null) {
@@ -409,7 +425,7 @@
         List<MetadataBuilder>? metadata = enumConstantInfo.metadata;
         String name = enumConstantInfo.name;
         MemberBuilder? existing =
-            nameSpaceBuilder.lookupLocalMember(name, setter: false);
+            nameSpace.lookupLocalMember(name, setter: false) as MemberBuilder?;
         if (existing != null) {
           // The existing declaration is synthetic if it has the same
           // charOffset as the enclosing enum.
@@ -478,8 +494,11 @@
             fieldSetterReference: setterReference,
             initializerToken: enumConstantInfo.argumentsBeginToken,
             isEnumElement: true);
-        nameSpaceBuilder.addLocalMember(name, fieldBuilder..next = existing,
+        nameSpace.addLocalMember(name, fieldBuilder..next = existing,
             setter: false);
+        nameSpaceBuilder.checkTypeVariableConflict(libraryBuilder,
+            fieldBuilder.name, fieldBuilder, fieldBuilder.fileUri);
+        fieldBuilder.parent = this;
         elementBuilders.add(fieldBuilder);
       }
     }
diff --git a/pkg/front_end/lib/src/source/source_extension_builder.dart b/pkg/front_end/lib/src/source/source_extension_builder.dart
index 7431451..959ab8b 100644
--- a/pkg/front_end/lib/src/source/source_extension_builder.dart
+++ b/pkg/front_end/lib/src/source/source_extension_builder.dart
@@ -90,8 +90,8 @@
 
   @override
   void buildScopes(LibraryBuilder coreLibrary) {
-    _nameSpace =
-        _nameSpaceBuilder.buildNameSpace(this, includeConstructors: false);
+    _nameSpace = _nameSpaceBuilder.buildNameSpace(libraryBuilder, this,
+        includeConstructors: false);
     _scope = new NameSpaceLookupScope(
         _nameSpace, ScopeKind.declaration, "extension ${extensionName.name}",
         parent: typeParameterScope);
diff --git a/pkg/front_end/lib/src/source/source_extension_type_declaration_builder.dart b/pkg/front_end/lib/src/source/source_extension_type_declaration_builder.dart
index cef59eb..9f324cb 100644
--- a/pkg/front_end/lib/src/source/source_extension_type_declaration_builder.dart
+++ b/pkg/front_end/lib/src/source/source_extension_type_declaration_builder.dart
@@ -113,7 +113,7 @@
 
   @override
   void buildScopes(LibraryBuilder coreLibrary) {
-    _nameSpace = _nameSpaceBuilder.buildNameSpace(this);
+    _nameSpace = _nameSpaceBuilder.buildNameSpace(libraryBuilder, this);
     _scope = new NameSpaceLookupScope(
         _nameSpace, ScopeKind.declaration, "extension type $name",
         parent: typeParameterScope);
diff --git a/pkg/front_end/lib/src/source/type_parameter_scope_builder.dart b/pkg/front_end/lib/src/source/type_parameter_scope_builder.dart
index bae6525..7d342da 100644
--- a/pkg/front_end/lib/src/source/type_parameter_scope_builder.dart
+++ b/pkg/front_end/lib/src/source/type_parameter_scope_builder.dart
@@ -4,9 +4,11 @@
 
 import '../base/messages.dart';
 import '../base/name_space.dart';
+import '../base/problems.dart';
 import '../base/scope.dart';
 import '../builder/builder.dart';
 import '../builder/declaration_builders.dart';
+import '../builder/function_builder.dart';
 import '../builder/member_builder.dart';
 import '../builder/type_builder.dart';
 import 'name_scheme.dart';
@@ -106,8 +108,6 @@
 
   final Map<String, Builder>? members;
 
-  final Map<String, MemberBuilder>? constructors;
-
   final Map<String, MemberBuilder>? setters;
 
   final Set<ExtensionBuilder>? extensions;
@@ -119,6 +119,8 @@
 
   List<SourceFieldBuilder>? primaryConstructorFields;
 
+  List<_AddBuilder> _addedBuilders = [];
+
   // TODO(johnniwinther): Stop using [_name] for determining the declaration
   // kind.
   String _name;
@@ -139,35 +141,25 @@
 
   bool declaresConstConstructor = false;
 
-  TypeParameterScopeBuilder(
-      this._kind,
-      this.members,
-      this.setters,
-      this.constructors,
-      this.extensions,
-      this._name,
-      this._charOffset,
-      this.parent);
+  TypeParameterScopeBuilder(this._kind, this.members, this.setters,
+      this.extensions, this._name, this._charOffset, this.parent);
 
   TypeParameterScopeBuilder.library()
       : this(
             TypeParameterScopeKind.library,
             <String, Builder>{},
             <String, MemberBuilder>{},
-            null,
-            // No support for constructors in library scopes.
             <ExtensionBuilder>{},
             "<library>",
             -1,
             null);
 
   TypeParameterScopeBuilder createNested(
-      TypeParameterScopeKind kind, String name, bool hasMembers) {
+      TypeParameterScopeKind kind, String name) {
     return new TypeParameterScopeBuilder(
         kind,
-        hasMembers ? <String, MemberBuilder>{} : null,
-        hasMembers ? <String, MemberBuilder>{} : null,
-        hasMembers ? <String, MemberBuilder>{} : null,
+        null,
+        null,
         null,
         // No support for extensions in nested scopes.
         name,
@@ -326,14 +318,6 @@
     (primaryConstructorFields ??= []).add(builder);
   }
 
-  // Coverage-ignore(suite): Not run.
-  LookupScope toLookupScope(List<TypeVariableBuilder>? typeVariableBuilders) {
-    LookupScope lookupScope = new FixedLookupScope(
-        ScopeKind.typeParameters, name,
-        getables: members, setables: setters);
-    return TypeParameterScope.fromList(lookupScope, typeVariableBuilders);
-  }
-
   NameSpace toNameSpace() {
     return new NameSpaceImpl(
         getables: members, setables: setters, extensions: extensions);
@@ -341,58 +325,144 @@
 
   DeclarationNameSpaceBuilder toDeclarationNameSpaceBuilder(
       Map<String, NominalVariableBuilder>? typeVariables) {
+    assert(members == null);
+    assert(setters == null);
+    assert(extensions == null);
     return new DeclarationNameSpaceBuilder._(
-        members, setters, constructors, extensions, typeVariables);
+        name, typeVariables, _addedBuilders);
+  }
+
+  void addBuilderToDeclaration(
+      String name, Builder declaration, Uri fileUri, int charOffset) {
+    _addedBuilders.add(new _AddBuilder(name, declaration, fileUri, charOffset));
   }
 
   @override
   String toString() => 'DeclarationBuilder(${hashCode}:kind=$kind,name=$name)';
 }
 
+class _AddBuilder {
+  final String name;
+  final Builder declaration;
+  final Uri fileUri;
+  final int charOffset;
+
+  _AddBuilder(this.name, this.declaration, this.fileUri, this.charOffset);
+}
+
 class DeclarationNameSpaceBuilder {
-  final Map<String, Builder>? _getables;
-  final Map<String, MemberBuilder>? _setables;
-  final Map<String, MemberBuilder>? _constructors;
-  final Set<ExtensionBuilder>? _extensions;
+  final String _name;
   final Map<String, NominalVariableBuilder>? _typeVariables;
+  final List<_AddBuilder> _addedBuilders;
 
   DeclarationNameSpaceBuilder.empty()
-      : _getables = null,
-        _setables = null,
-        _constructors = null,
-        _extensions = null,
-        _typeVariables = null;
+      : _name = '',
+        _typeVariables = null,
+        _addedBuilders = const [];
 
-  DeclarationNameSpaceBuilder._(this._getables, this._setables,
-      this._constructors, this._extensions, this._typeVariables);
+  DeclarationNameSpaceBuilder._(
+      this._name, this._typeVariables, this._addedBuilders);
 
-  void addLocalMember(String name, MemberBuilder builder,
-      {required bool setter}) {
-    (setter
-        ?
+  void _addBuilder(
+      ProblemReporting problemReporting,
+      Map<String, Builder> getables,
+      Map<String, MemberBuilder> setables,
+      Map<String, MemberBuilder> constructors,
+      _AddBuilder addBuilder) {
+    String name = addBuilder.name;
+    Builder declaration = addBuilder.declaration;
+    Uri fileUri = addBuilder.fileUri;
+    int charOffset = addBuilder.charOffset;
+
+    bool isConstructor = declaration is FunctionBuilder &&
+        (declaration.isConstructor || declaration.isFactory);
+    if (!isConstructor && name == _name) {
+      problemReporting.addProblem(
+          messageMemberWithSameNameAsClass, charOffset, noLength, fileUri);
+    }
+    Map<String, Builder> members = isConstructor
+        ? constructors
+        : (declaration.isSetter ? setables : getables);
+
+    Builder? existing = members[name];
+
+    if (existing == declaration) return;
+
+    if (declaration.next != null &&
         // Coverage-ignore(suite): Not run.
-        _setables
-        : _getables)![name] = builder;
+        declaration.next != existing) {
+      unexpected(
+          "${declaration.next!.fileUri}@${declaration.next!.charOffset}",
+          "${existing?.fileUri}@${existing?.charOffset}",
+          declaration.charOffset,
+          declaration.fileUri);
+    }
+    declaration.next = existing;
+    if (isDuplicatedDeclaration(existing, declaration)) {
+      String fullName = name;
+      if (isConstructor) {
+        if (name.isEmpty) {
+          fullName = _name;
+        } else {
+          fullName = "${_name}.$name";
+        }
+      }
+      problemReporting.addProblem(
+          templateDuplicatedDeclaration.withArguments(fullName),
+          charOffset,
+          fullName.length,
+          declaration.fileUri!,
+          context: <LocatedMessage>[
+            templateDuplicatedDeclarationCause
+                .withArguments(fullName)
+                .withLocation(
+                    existing!.fileUri!, existing.charOffset, fullName.length)
+          ]);
+    } else if (declaration.isAugment) {
+      // Coverage-ignore-block(suite): Not run.
+      if (existing != null) {
+        if (declaration.isSetter) {
+          // TODO(johnniwinther): Collection augment setables.
+        } else {
+          // TODO(johnniwinther): Collection augment getables.
+        }
+      } else {
+        // TODO(cstefantsova): Report an error.
+      }
+    }
+    members[name] = declaration;
   }
 
-  MemberBuilder? lookupLocalMember(String name, {required bool setter}) {
-    return (setter
-        ?
-        // Coverage-ignore(suite): Not run.
-        _setables
-        : _getables)![name] as MemberBuilder?;
+  void checkTypeVariableConflict(ProblemReporting _problemReporting,
+      String name, Builder member, Uri fileUri) {
+    if (_typeVariables != null) {
+      NominalVariableBuilder? tv = _typeVariables![name];
+      if (tv != null) {
+        _problemReporting.addProblem(
+            templateConflictsWithTypeVariable.withArguments(name),
+            member.charOffset,
+            name.length,
+            fileUri,
+            context: [
+              messageConflictsWithTypeVariableCause.withLocation(
+                  tv.fileUri!, tv.charOffset, name.length)
+            ]);
+      }
+    }
   }
 
-  void addConstructor(String name, MemberBuilder builder) {
-    _constructors![name] = builder;
-  }
-
-  Iterable<MemberBuilder> get constructors =>
-      _constructors?.values ?? // Coverage-ignore(suite): Not run.
-      [];
-
-  DeclarationNameSpace buildNameSpace(IDeclarationBuilder parent,
+  DeclarationNameSpace buildNameSpace(
+      ProblemReporting problemReporting, IDeclarationBuilder parent,
       {bool includeConstructors = true}) {
+    Map<String, Builder> getables = {};
+    Map<String, MemberBuilder> setables = {};
+    Map<String, MemberBuilder> constructors = {};
+
+    for (_AddBuilder addedBuilder in _addedBuilders) {
+      _addBuilder(
+          problemReporting, getables, setables, constructors, addedBuilder);
+    }
+
     void setParent(MemberBuilder? member) {
       while (member != null) {
         member.parent = parent;
@@ -401,34 +471,22 @@
     }
 
     void setParentAndCheckConflicts(String name, Builder member) {
-      if (_typeVariables != null) {
-        NominalVariableBuilder? tv = _typeVariables![name];
-        if (tv != null) {
-          parent.addProblem(
-              templateConflictsWithTypeVariable.withArguments(name),
-              member.charOffset,
-              name.length,
-              context: [
-                messageConflictsWithTypeVariableCause.withLocation(
-                    tv.fileUri!, tv.charOffset, name.length)
-              ]);
-        }
-      }
+      checkTypeVariableConflict(
+          problemReporting, name, member, member.fileUri!);
       setParent(member as MemberBuilder);
     }
 
-    _getables?.forEach(setParentAndCheckConflicts);
-    _setables?.forEach(setParentAndCheckConflicts);
-    _constructors?.forEach(setParentAndCheckConflicts);
+    getables.forEach(setParentAndCheckConflicts);
+    setables.forEach(setParentAndCheckConflicts);
+    constructors.forEach(setParentAndCheckConflicts);
 
     return new DeclarationNameSpaceImpl(
-        getables: _getables,
-        setables: _setables,
-        extensions: _extensions,
+        getables: getables,
+        setables: setables,
         // TODO(johnniwinther): Handle constructors in extensions consistently.
         // Currently they are not part of the name space but still processed
         // for instance when inferring redirecting factories.
-        constructors: includeConstructors ? _constructors : null);
+        constructors: includeConstructors ? constructors : null);
   }
 }
 
@@ -517,3 +575,25 @@
     return _declarationBuilder?.scope.lookupSetable(name, charOffset, fileUri);
   }
 }
+
+bool isDuplicatedDeclaration(Builder? existing, Builder other) {
+  if (existing == null) return false;
+  if (other.isAugment) return false;
+  Builder? next = existing.next;
+  if (next == null) {
+    if (existing.isGetter && other.isSetter) return false;
+    if (existing.isSetter && other.isGetter) return false;
+  } else {
+    if (next is ClassBuilder && !next.isMixinApplication) return true;
+  }
+  if (existing is ClassBuilder && other is ClassBuilder) {
+    // We allow multiple mixin applications with the same name. An
+    // alternative is to share these mixin applications. This situation can
+    // happen if you have `class A extends Object with Mixin {}` and `class B
+    // extends Object with Mixin {}` in the same library.
+    return !existing.isMixinApplication ||
+        // Coverage-ignore(suite): Not run.
+        !other.isMixinApplication;
+  }
+  return true;
+}
diff --git a/pkg/front_end/test/coverage_suite_expected.dart b/pkg/front_end/test/coverage_suite_expected.dart
index 06b69a4..3f2e699 100644
--- a/pkg/front_end/test/coverage_suite_expected.dart
+++ b/pkg/front_end/test/coverage_suite_expected.dart
@@ -510,7 +510,7 @@
   ),
   // 100.0%.
   "package:front_end/src/kernel/const_conditional_simplifier.dart": (
-    hitCount: 72,
+    hitCount: 95,
     missCount: 0,
   ),
   // 100.0%.
@@ -795,7 +795,7 @@
   ),
   // 100.0%.
   "package:front_end/src/source/source_builder_factory.dart": (
-    hitCount: 1590,
+    hitCount: 1574,
     missCount: 0,
   ),
   // 100.0%.
@@ -805,7 +805,7 @@
   ),
   // 100.0%.
   "package:front_end/src/source/source_class_builder.dart": (
-    hitCount: 1224,
+    hitCount: 1225,
     missCount: 0,
   ),
   // 100.0%.
@@ -820,18 +820,18 @@
   ),
   // 100.0%.
   "package:front_end/src/source/source_enum_builder.dart": (
-    hitCount: 486,
+    hitCount: 521,
     missCount: 0,
   ),
   // 100.0%.
   "package:front_end/src/source/source_extension_builder.dart": (
-    hitCount: 86,
+    hitCount: 87,
     missCount: 0,
   ),
   // 100.0%.
   "package:front_end/src/source/source_extension_type_declaration_builder.dart":
       (
-    hitCount: 468,
+    hitCount: 469,
     missCount: 0,
   ),
   // 100.0%.
@@ -881,7 +881,7 @@
   ),
   // 100.0%.
   "package:front_end/src/source/type_parameter_scope_builder.dart": (
-    hitCount: 198,
+    hitCount: 238,
     missCount: 0,
   ),
   // 100.0%.
diff --git a/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.expect b/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.expect
index 69e32fd..a000e30 100644
--- a/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.expect
+++ b/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.expect
@@ -2,13 +2,6 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/enhanced_enums/declared_values.dart:21:7: Error: 'values' is already declared in this scope.
-//   int values = 42; // Error: Duplicate.
-//       ^^^^^^
-// pkg/front_end/testcases/enhanced_enums/declared_values.dart:20:25: Context: Previous declaration of 'values'.
-//   static const List<E3> values = [E3.element]; // Error in E3.
-//                         ^^^^^^
-//
 // pkg/front_end/testcases/enhanced_enums/declared_values.dart:8:25: Error: An enum can't declare a member named 'values'.
 //   static const List<E1> values = [E1.element]; // Error in E1.
 //                         ^^^^^^
@@ -17,6 +10,13 @@
 //   int values = 42; // Error in E2.
 //       ^^^^^^
 //
+// pkg/front_end/testcases/enhanced_enums/declared_values.dart:21:7: Error: 'values' is already declared in this scope.
+//   int values = 42; // Error: Duplicate.
+//       ^^^^^^
+// pkg/front_end/testcases/enhanced_enums/declared_values.dart:20:25: Context: Previous declaration of 'values'.
+//   static const List<E3> values = [E3.element]; // Error in E3.
+//                         ^^^^^^
+//
 // pkg/front_end/testcases/enhanced_enums/declared_values.dart:20:25: Error: An enum can't declare a member named 'values'.
 //   static const List<E3> values = [E3.element]; // Error in E3.
 //                         ^^^^^^
diff --git a/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.modular.expect b/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.modular.expect
index 69e32fd..a000e30 100644
--- a/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.modular.expect
+++ b/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.modular.expect
@@ -2,13 +2,6 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/enhanced_enums/declared_values.dart:21:7: Error: 'values' is already declared in this scope.
-//   int values = 42; // Error: Duplicate.
-//       ^^^^^^
-// pkg/front_end/testcases/enhanced_enums/declared_values.dart:20:25: Context: Previous declaration of 'values'.
-//   static const List<E3> values = [E3.element]; // Error in E3.
-//                         ^^^^^^
-//
 // pkg/front_end/testcases/enhanced_enums/declared_values.dart:8:25: Error: An enum can't declare a member named 'values'.
 //   static const List<E1> values = [E1.element]; // Error in E1.
 //                         ^^^^^^
@@ -17,6 +10,13 @@
 //   int values = 42; // Error in E2.
 //       ^^^^^^
 //
+// pkg/front_end/testcases/enhanced_enums/declared_values.dart:21:7: Error: 'values' is already declared in this scope.
+//   int values = 42; // Error: Duplicate.
+//       ^^^^^^
+// pkg/front_end/testcases/enhanced_enums/declared_values.dart:20:25: Context: Previous declaration of 'values'.
+//   static const List<E3> values = [E3.element]; // Error in E3.
+//                         ^^^^^^
+//
 // pkg/front_end/testcases/enhanced_enums/declared_values.dart:20:25: Error: An enum can't declare a member named 'values'.
 //   static const List<E3> values = [E3.element]; // Error in E3.
 //                         ^^^^^^
diff --git a/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.outline.expect b/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.outline.expect
index 6f12e6d..c56486e 100644
--- a/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.outline.expect
+++ b/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.outline.expect
@@ -2,13 +2,6 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/enhanced_enums/declared_values.dart:21:7: Error: 'values' is already declared in this scope.
-//   int values = 42; // Error: Duplicate.
-//       ^^^^^^
-// pkg/front_end/testcases/enhanced_enums/declared_values.dart:20:25: Context: Previous declaration of 'values'.
-//   static const List<E3> values = [E3.element]; // Error in E3.
-//                         ^^^^^^
-//
 // pkg/front_end/testcases/enhanced_enums/declared_values.dart:8:25: Error: An enum can't declare a member named 'values'.
 //   static const List<E1> values = [E1.element]; // Error in E1.
 //                         ^^^^^^
@@ -17,6 +10,13 @@
 //   int values = 42; // Error in E2.
 //       ^^^^^^
 //
+// pkg/front_end/testcases/enhanced_enums/declared_values.dart:21:7: Error: 'values' is already declared in this scope.
+//   int values = 42; // Error: Duplicate.
+//       ^^^^^^
+// pkg/front_end/testcases/enhanced_enums/declared_values.dart:20:25: Context: Previous declaration of 'values'.
+//   static const List<E3> values = [E3.element]; // Error in E3.
+//                         ^^^^^^
+//
 // pkg/front_end/testcases/enhanced_enums/declared_values.dart:20:25: Error: An enum can't declare a member named 'values'.
 //   static const List<E3> values = [E3.element]; // Error in E3.
 //                         ^^^^^^
diff --git a/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.transformed.expect b/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.transformed.expect
index 69e32fd..a000e30 100644
--- a/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/enhanced_enums/declared_values.dart.strong.transformed.expect
@@ -2,13 +2,6 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/enhanced_enums/declared_values.dart:21:7: Error: 'values' is already declared in this scope.
-//   int values = 42; // Error: Duplicate.
-//       ^^^^^^
-// pkg/front_end/testcases/enhanced_enums/declared_values.dart:20:25: Context: Previous declaration of 'values'.
-//   static const List<E3> values = [E3.element]; // Error in E3.
-//                         ^^^^^^
-//
 // pkg/front_end/testcases/enhanced_enums/declared_values.dart:8:25: Error: An enum can't declare a member named 'values'.
 //   static const List<E1> values = [E1.element]; // Error in E1.
 //                         ^^^^^^
@@ -17,6 +10,13 @@
 //   int values = 42; // Error in E2.
 //       ^^^^^^
 //
+// pkg/front_end/testcases/enhanced_enums/declared_values.dart:21:7: Error: 'values' is already declared in this scope.
+//   int values = 42; // Error: Duplicate.
+//       ^^^^^^
+// pkg/front_end/testcases/enhanced_enums/declared_values.dart:20:25: Context: Previous declaration of 'values'.
+//   static const List<E3> values = [E3.element]; // Error in E3.
+//                         ^^^^^^
+//
 // pkg/front_end/testcases/enhanced_enums/declared_values.dart:20:25: Error: An enum can't declare a member named 'values'.
 //   static const List<E3> values = [E3.element]; // Error in E3.
 //                         ^^^^^^
diff --git a/pkg/front_end/testcases/extension_types/field_initializer.dart.strong.expect b/pkg/front_end/testcases/extension_types/field_initializer.dart.strong.expect
index 14f47d9..9ff96d6 100644
--- a/pkg/front_end/testcases/extension_types/field_initializer.dart.strong.expect
+++ b/pkg/front_end/testcases/extension_types/field_initializer.dart.strong.expect
@@ -7,13 +7,6 @@
 //   int id = 0;
 //       ^^
 //
-// pkg/front_end/testcases/extension_types/field_initializer.dart:6:7: Error: 'id' is already declared in this scope.
-//   int id = 0;
-//       ^^
-// pkg/front_end/testcases/extension_types/field_initializer.dart:5:24: Context: Previous declaration of 'id'.
-// extension type ET1(int id) {
-//                        ^^
-//
 // pkg/front_end/testcases/extension_types/field_initializer.dart:10:7: Error: Extension types can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   int x = 0;
@@ -24,6 +17,13 @@
 //   final int x = 0;
 //             ^
 //
+// pkg/front_end/testcases/extension_types/field_initializer.dart:6:7: Error: 'id' is already declared in this scope.
+//   int id = 0;
+//       ^^
+// pkg/front_end/testcases/extension_types/field_initializer.dart:5:24: Context: Previous declaration of 'id'.
+// extension type ET1(int id) {
+//                        ^^
+//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/extension_types/field_initializer.dart.strong.modular.expect b/pkg/front_end/testcases/extension_types/field_initializer.dart.strong.modular.expect
index 14f47d9..9ff96d6 100644
--- a/pkg/front_end/testcases/extension_types/field_initializer.dart.strong.modular.expect
+++ b/pkg/front_end/testcases/extension_types/field_initializer.dart.strong.modular.expect
@@ -7,13 +7,6 @@
 //   int id = 0;
 //       ^^
 //
-// pkg/front_end/testcases/extension_types/field_initializer.dart:6:7: Error: 'id' is already declared in this scope.
-//   int id = 0;
-//       ^^
-// pkg/front_end/testcases/extension_types/field_initializer.dart:5:24: Context: Previous declaration of 'id'.
-// extension type ET1(int id) {
-//                        ^^
-//
 // pkg/front_end/testcases/extension_types/field_initializer.dart:10:7: Error: Extension types can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   int x = 0;
@@ -24,6 +17,13 @@
 //   final int x = 0;
 //             ^
 //
+// pkg/front_end/testcases/extension_types/field_initializer.dart:6:7: Error: 'id' is already declared in this scope.
+//   int id = 0;
+//       ^^
+// pkg/front_end/testcases/extension_types/field_initializer.dart:5:24: Context: Previous declaration of 'id'.
+// extension type ET1(int id) {
+//                        ^^
+//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/extension_types/field_initializer.dart.strong.outline.expect b/pkg/front_end/testcases/extension_types/field_initializer.dart.strong.outline.expect
index 3c13d49..9489bc8 100644
--- a/pkg/front_end/testcases/extension_types/field_initializer.dart.strong.outline.expect
+++ b/pkg/front_end/testcases/extension_types/field_initializer.dart.strong.outline.expect
@@ -7,13 +7,6 @@
 //   int id = 0;
 //       ^^
 //
-// pkg/front_end/testcases/extension_types/field_initializer.dart:6:7: Error: 'id' is already declared in this scope.
-//   int id = 0;
-//       ^^
-// pkg/front_end/testcases/extension_types/field_initializer.dart:5:24: Context: Previous declaration of 'id'.
-// extension type ET1(int id) {
-//                        ^^
-//
 // pkg/front_end/testcases/extension_types/field_initializer.dart:10:7: Error: Extension types can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   int x = 0;
@@ -24,6 +17,13 @@
 //   final int x = 0;
 //             ^
 //
+// pkg/front_end/testcases/extension_types/field_initializer.dart:6:7: Error: 'id' is already declared in this scope.
+//   int id = 0;
+//       ^^
+// pkg/front_end/testcases/extension_types/field_initializer.dart:5:24: Context: Previous declaration of 'id'.
+// extension type ET1(int id) {
+//                        ^^
+//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/extension_types/field_initializer.dart.strong.transformed.expect b/pkg/front_end/testcases/extension_types/field_initializer.dart.strong.transformed.expect
index 14f47d9..9ff96d6 100644
--- a/pkg/front_end/testcases/extension_types/field_initializer.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/extension_types/field_initializer.dart.strong.transformed.expect
@@ -7,13 +7,6 @@
 //   int id = 0;
 //       ^^
 //
-// pkg/front_end/testcases/extension_types/field_initializer.dart:6:7: Error: 'id' is already declared in this scope.
-//   int id = 0;
-//       ^^
-// pkg/front_end/testcases/extension_types/field_initializer.dart:5:24: Context: Previous declaration of 'id'.
-// extension type ET1(int id) {
-//                        ^^
-//
 // pkg/front_end/testcases/extension_types/field_initializer.dart:10:7: Error: Extension types can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   int x = 0;
@@ -24,6 +17,13 @@
 //   final int x = 0;
 //             ^
 //
+// pkg/front_end/testcases/extension_types/field_initializer.dart:6:7: Error: 'id' is already declared in this scope.
+//   int id = 0;
+//       ^^
+// pkg/front_end/testcases/extension_types/field_initializer.dart:5:24: Context: Previous declaration of 'id'.
+// extension type ET1(int id) {
+//                        ^^
+//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/extension_types/late_fields.dart.strong.expect b/pkg/front_end/testcases/extension_types/late_fields.dart.strong.expect
index 86fd38e..26c622a 100644
--- a/pkg/front_end/testcases/extension_types/late_fields.dart.strong.expect
+++ b/pkg/front_end/testcases/extension_types/late_fields.dart.strong.expect
@@ -7,13 +7,6 @@
 //   late int id = 0;
 //            ^^
 //
-// pkg/front_end/testcases/extension_types/late_fields.dart:6:12: Error: 'id' is already declared in this scope.
-//   late int id = 0;
-//            ^^
-// pkg/front_end/testcases/extension_types/late_fields.dart:5:24: Context: Previous declaration of 'id'.
-// extension type ET1(int id) {
-//                        ^^
-//
 // pkg/front_end/testcases/extension_types/late_fields.dart:10:12: Error: Extension types can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   late int x = 0;
@@ -29,6 +22,13 @@
 //   late final int x;
 //                  ^
 //
+// pkg/front_end/testcases/extension_types/late_fields.dart:6:12: Error: 'id' is already declared in this scope.
+//   late int id = 0;
+//            ^^
+// pkg/front_end/testcases/extension_types/late_fields.dart:5:24: Context: Previous declaration of 'id'.
+// extension type ET1(int id) {
+//                        ^^
+//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/extension_types/late_fields.dart.strong.modular.expect b/pkg/front_end/testcases/extension_types/late_fields.dart.strong.modular.expect
index 86fd38e..26c622a 100644
--- a/pkg/front_end/testcases/extension_types/late_fields.dart.strong.modular.expect
+++ b/pkg/front_end/testcases/extension_types/late_fields.dart.strong.modular.expect
@@ -7,13 +7,6 @@
 //   late int id = 0;
 //            ^^
 //
-// pkg/front_end/testcases/extension_types/late_fields.dart:6:12: Error: 'id' is already declared in this scope.
-//   late int id = 0;
-//            ^^
-// pkg/front_end/testcases/extension_types/late_fields.dart:5:24: Context: Previous declaration of 'id'.
-// extension type ET1(int id) {
-//                        ^^
-//
 // pkg/front_end/testcases/extension_types/late_fields.dart:10:12: Error: Extension types can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   late int x = 0;
@@ -29,6 +22,13 @@
 //   late final int x;
 //                  ^
 //
+// pkg/front_end/testcases/extension_types/late_fields.dart:6:12: Error: 'id' is already declared in this scope.
+//   late int id = 0;
+//            ^^
+// pkg/front_end/testcases/extension_types/late_fields.dart:5:24: Context: Previous declaration of 'id'.
+// extension type ET1(int id) {
+//                        ^^
+//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/extension_types/late_fields.dart.strong.outline.expect b/pkg/front_end/testcases/extension_types/late_fields.dart.strong.outline.expect
index 51002ab..e7c26e9 100644
--- a/pkg/front_end/testcases/extension_types/late_fields.dart.strong.outline.expect
+++ b/pkg/front_end/testcases/extension_types/late_fields.dart.strong.outline.expect
@@ -7,13 +7,6 @@
 //   late int id = 0;
 //            ^^
 //
-// pkg/front_end/testcases/extension_types/late_fields.dart:6:12: Error: 'id' is already declared in this scope.
-//   late int id = 0;
-//            ^^
-// pkg/front_end/testcases/extension_types/late_fields.dart:5:24: Context: Previous declaration of 'id'.
-// extension type ET1(int id) {
-//                        ^^
-//
 // pkg/front_end/testcases/extension_types/late_fields.dart:10:12: Error: Extension types can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   late int x = 0;
@@ -29,6 +22,13 @@
 //   late final int x;
 //                  ^
 //
+// pkg/front_end/testcases/extension_types/late_fields.dart:6:12: Error: 'id' is already declared in this scope.
+//   late int id = 0;
+//            ^^
+// pkg/front_end/testcases/extension_types/late_fields.dart:5:24: Context: Previous declaration of 'id'.
+// extension type ET1(int id) {
+//                        ^^
+//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/extension_types/late_fields.dart.strong.transformed.expect b/pkg/front_end/testcases/extension_types/late_fields.dart.strong.transformed.expect
index 86fd38e..26c622a 100644
--- a/pkg/front_end/testcases/extension_types/late_fields.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/extension_types/late_fields.dart.strong.transformed.expect
@@ -7,13 +7,6 @@
 //   late int id = 0;
 //            ^^
 //
-// pkg/front_end/testcases/extension_types/late_fields.dart:6:12: Error: 'id' is already declared in this scope.
-//   late int id = 0;
-//            ^^
-// pkg/front_end/testcases/extension_types/late_fields.dart:5:24: Context: Previous declaration of 'id'.
-// extension type ET1(int id) {
-//                        ^^
-//
 // pkg/front_end/testcases/extension_types/late_fields.dart:10:12: Error: Extension types can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   late int x = 0;
@@ -29,6 +22,13 @@
 //   late final int x;
 //                  ^
 //
+// pkg/front_end/testcases/extension_types/late_fields.dart:6:12: Error: 'id' is already declared in this scope.
+//   late int id = 0;
+//            ^^
+// pkg/front_end/testcases/extension_types/late_fields.dart:5:24: Context: Previous declaration of 'id'.
+// extension type ET1(int id) {
+//                        ^^
+//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/extension_types/representation.dart.strong.expect b/pkg/front_end/testcases/extension_types/representation.dart.strong.expect
index 256b2cf..f7b0aa4 100644
--- a/pkg/front_end/testcases/extension_types/representation.dart.strong.expect
+++ b/pkg/front_end/testcases/extension_types/representation.dart.strong.expect
@@ -17,6 +17,10 @@
 // extension type Duplicate(bool instanceField, int instanceField) {} // Error
 //                               ^^^^^^^^^^^^^
 //
+// pkg/front_end/testcases/extension_types/representation.dart:9:25: Error: Each extension type should have exactly one representation field.
+// extension type Duplicate(bool instanceField, int instanceField) {} // Error
+//                         ^
+//
 // pkg/front_end/testcases/extension_types/representation.dart:9:50: Error: 'instanceField' is already declared in this scope.
 // extension type Duplicate(bool instanceField, int instanceField) {} // Error
 //                                                  ^^^^^^^^^^^^^
@@ -24,10 +28,6 @@
 // extension type Duplicate(bool instanceField, int instanceField) {} // Error
 //                               ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/extension_types/representation.dart:9:25: Error: Each extension type should have exactly one representation field.
-// extension type Duplicate(bool instanceField, int instanceField) {} // Error
-//                         ^
-//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/extension_types/representation.dart.strong.modular.expect b/pkg/front_end/testcases/extension_types/representation.dart.strong.modular.expect
index 256b2cf..f7b0aa4 100644
--- a/pkg/front_end/testcases/extension_types/representation.dart.strong.modular.expect
+++ b/pkg/front_end/testcases/extension_types/representation.dart.strong.modular.expect
@@ -17,6 +17,10 @@
 // extension type Duplicate(bool instanceField, int instanceField) {} // Error
 //                               ^^^^^^^^^^^^^
 //
+// pkg/front_end/testcases/extension_types/representation.dart:9:25: Error: Each extension type should have exactly one representation field.
+// extension type Duplicate(bool instanceField, int instanceField) {} // Error
+//                         ^
+//
 // pkg/front_end/testcases/extension_types/representation.dart:9:50: Error: 'instanceField' is already declared in this scope.
 // extension type Duplicate(bool instanceField, int instanceField) {} // Error
 //                                                  ^^^^^^^^^^^^^
@@ -24,10 +28,6 @@
 // extension type Duplicate(bool instanceField, int instanceField) {} // Error
 //                               ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/extension_types/representation.dart:9:25: Error: Each extension type should have exactly one representation field.
-// extension type Duplicate(bool instanceField, int instanceField) {} // Error
-//                         ^
-//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/extension_types/representation.dart.strong.outline.expect b/pkg/front_end/testcases/extension_types/representation.dart.strong.outline.expect
index 028fcc1..9ca5ee0 100644
--- a/pkg/front_end/testcases/extension_types/representation.dart.strong.outline.expect
+++ b/pkg/front_end/testcases/extension_types/representation.dart.strong.outline.expect
@@ -17,6 +17,10 @@
 // extension type Duplicate(bool instanceField, int instanceField) {} // Error
 //                               ^^^^^^^^^^^^^
 //
+// pkg/front_end/testcases/extension_types/representation.dart:9:25: Error: Each extension type should have exactly one representation field.
+// extension type Duplicate(bool instanceField, int instanceField) {} // Error
+//                         ^
+//
 // pkg/front_end/testcases/extension_types/representation.dart:9:50: Error: 'instanceField' is already declared in this scope.
 // extension type Duplicate(bool instanceField, int instanceField) {} // Error
 //                                                  ^^^^^^^^^^^^^
@@ -24,10 +28,6 @@
 // extension type Duplicate(bool instanceField, int instanceField) {} // Error
 //                               ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/extension_types/representation.dart:9:25: Error: Each extension type should have exactly one representation field.
-// extension type Duplicate(bool instanceField, int instanceField) {} // Error
-//                         ^
-//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/extension_types/representation.dart.strong.transformed.expect b/pkg/front_end/testcases/extension_types/representation.dart.strong.transformed.expect
index 256b2cf..f7b0aa4 100644
--- a/pkg/front_end/testcases/extension_types/representation.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/extension_types/representation.dart.strong.transformed.expect
@@ -17,6 +17,10 @@
 // extension type Duplicate(bool instanceField, int instanceField) {} // Error
 //                               ^^^^^^^^^^^^^
 //
+// pkg/front_end/testcases/extension_types/representation.dart:9:25: Error: Each extension type should have exactly one representation field.
+// extension type Duplicate(bool instanceField, int instanceField) {} // Error
+//                         ^
+//
 // pkg/front_end/testcases/extension_types/representation.dart:9:50: Error: 'instanceField' is already declared in this scope.
 // extension type Duplicate(bool instanceField, int instanceField) {} // Error
 //                                                  ^^^^^^^^^^^^^
@@ -24,10 +28,6 @@
 // extension type Duplicate(bool instanceField, int instanceField) {} // Error
 //                               ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/extension_types/representation.dart:9:25: Error: Each extension type should have exactly one representation field.
-// extension type Duplicate(bool instanceField, int instanceField) {} // Error
-//                         ^
-//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.expect b/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.expect
index 880614e6..edd8810 100644
--- a/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.expect
+++ b/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.expect
@@ -45,34 +45,6 @@
 // main() {
 // ^^^^
 //
-// pkg/front_end/testcases/general/duplicated_declarations.dart:45:3: Error: 'C' is already declared in this scope.
-//   C(a, b);
-//   ^
-// pkg/front_end/testcases/general/duplicated_declarations.dart:44:3: Context: Previous declaration of 'C'.
-//   C(a);
-//   ^
-//
-// pkg/front_end/testcases/general/duplicated_declarations.dart:48:7: Error: 'field' is already declared in this scope.
-//   var field = "2nd";
-//       ^^^^^
-// pkg/front_end/testcases/general/duplicated_declarations.dart:46:7: Context: Previous declaration of 'field'.
-//   var field = "1st";
-//       ^^^^^
-//
-// pkg/front_end/testcases/general/duplicated_declarations.dart:54:3: Error: 'm' is already declared in this scope.
-//   m() {
-//   ^
-// pkg/front_end/testcases/general/duplicated_declarations.dart:50:3: Context: Previous declaration of 'm'.
-//   m() {
-//   ^
-//
-// pkg/front_end/testcases/general/duplicated_declarations.dart:62:10: Error: 's' is already declared in this scope.
-//   static s() {
-//          ^
-// pkg/front_end/testcases/general/duplicated_declarations.dart:58:10: Context: Previous declaration of 's'.
-//   static s() {
-//          ^
-//
 // pkg/front_end/testcases/general/duplicated_declarations.dart:74:7: Error: 'C' is already declared in this scope.
 // class C {
 //       ^
@@ -186,6 +158,34 @@
 // main() {
 // ^^^^
 //
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Error: 'C' is already declared in this scope.
+// class C {
+//       ^
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:41:7: Context: Previous declaration of 'C'.
+// class C {
+//       ^
+//
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:71:7: Error: 'C' is already declared in this scope.
+// class C {
+//       ^
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Context: Previous declaration of 'C'.
+// class C {
+//       ^
+//
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Error: 'Enum' is already declared in this scope.
+// enum Enum {
+//      ^^^^
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:75:6: Context: Previous declaration of 'Enum'.
+// enum Enum {
+//      ^^^^
+//
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:88:6: Error: 'Enum' is already declared in this scope.
+// enum Enum {
+//      ^^^^
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Context: Previous declaration of 'Enum'.
+// enum Enum {
+//      ^^^^
+//
 // pkg/front_end/testcases/general/duplicated_declarations_part.dart:43:3: Error: 'C' is already declared in this scope.
 //   C(a, b);
 //   ^
@@ -214,33 +214,33 @@
 //   static s() {
 //          ^
 //
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Error: 'C' is already declared in this scope.
-// class C {
-//       ^
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:41:7: Context: Previous declaration of 'C'.
-// class C {
-//       ^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:45:3: Error: 'C' is already declared in this scope.
+//   C(a, b);
+//   ^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:44:3: Context: Previous declaration of 'C'.
+//   C(a);
+//   ^
 //
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:71:7: Error: 'C' is already declared in this scope.
-// class C {
-//       ^
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Context: Previous declaration of 'C'.
-// class C {
-//       ^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:48:7: Error: 'field' is already declared in this scope.
+//   var field = "2nd";
+//       ^^^^^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:46:7: Context: Previous declaration of 'field'.
+//   var field = "1st";
+//       ^^^^^
 //
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Error: 'Enum' is already declared in this scope.
-// enum Enum {
-//      ^^^^
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:75:6: Context: Previous declaration of 'Enum'.
-// enum Enum {
-//      ^^^^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:54:3: Error: 'm' is already declared in this scope.
+//   m() {
+//   ^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:50:3: Context: Previous declaration of 'm'.
+//   m() {
+//   ^
 //
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:88:6: Error: 'Enum' is already declared in this scope.
-// enum Enum {
-//      ^^^^
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Context: Previous declaration of 'Enum'.
-// enum Enum {
-//      ^^^^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:62:10: Error: 's' is already declared in this scope.
+//   static s() {
+//          ^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:58:10: Context: Previous declaration of 's'.
+//   static s() {
+//          ^
 //
 // pkg/front_end/testcases/general/duplicated_declarations.dart:70:4: Error: Name of enum constant 'Enum' can't be the same as the enum's own name.
 //   Sub() : super(null);
diff --git a/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.modular.expect b/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.modular.expect
index 880614e6..edd8810 100644
--- a/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.modular.expect
+++ b/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.modular.expect
@@ -45,34 +45,6 @@
 // main() {
 // ^^^^
 //
-// pkg/front_end/testcases/general/duplicated_declarations.dart:45:3: Error: 'C' is already declared in this scope.
-//   C(a, b);
-//   ^
-// pkg/front_end/testcases/general/duplicated_declarations.dart:44:3: Context: Previous declaration of 'C'.
-//   C(a);
-//   ^
-//
-// pkg/front_end/testcases/general/duplicated_declarations.dart:48:7: Error: 'field' is already declared in this scope.
-//   var field = "2nd";
-//       ^^^^^
-// pkg/front_end/testcases/general/duplicated_declarations.dart:46:7: Context: Previous declaration of 'field'.
-//   var field = "1st";
-//       ^^^^^
-//
-// pkg/front_end/testcases/general/duplicated_declarations.dart:54:3: Error: 'm' is already declared in this scope.
-//   m() {
-//   ^
-// pkg/front_end/testcases/general/duplicated_declarations.dart:50:3: Context: Previous declaration of 'm'.
-//   m() {
-//   ^
-//
-// pkg/front_end/testcases/general/duplicated_declarations.dart:62:10: Error: 's' is already declared in this scope.
-//   static s() {
-//          ^
-// pkg/front_end/testcases/general/duplicated_declarations.dart:58:10: Context: Previous declaration of 's'.
-//   static s() {
-//          ^
-//
 // pkg/front_end/testcases/general/duplicated_declarations.dart:74:7: Error: 'C' is already declared in this scope.
 // class C {
 //       ^
@@ -186,6 +158,34 @@
 // main() {
 // ^^^^
 //
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Error: 'C' is already declared in this scope.
+// class C {
+//       ^
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:41:7: Context: Previous declaration of 'C'.
+// class C {
+//       ^
+//
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:71:7: Error: 'C' is already declared in this scope.
+// class C {
+//       ^
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Context: Previous declaration of 'C'.
+// class C {
+//       ^
+//
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Error: 'Enum' is already declared in this scope.
+// enum Enum {
+//      ^^^^
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:75:6: Context: Previous declaration of 'Enum'.
+// enum Enum {
+//      ^^^^
+//
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:88:6: Error: 'Enum' is already declared in this scope.
+// enum Enum {
+//      ^^^^
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Context: Previous declaration of 'Enum'.
+// enum Enum {
+//      ^^^^
+//
 // pkg/front_end/testcases/general/duplicated_declarations_part.dart:43:3: Error: 'C' is already declared in this scope.
 //   C(a, b);
 //   ^
@@ -214,33 +214,33 @@
 //   static s() {
 //          ^
 //
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Error: 'C' is already declared in this scope.
-// class C {
-//       ^
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:41:7: Context: Previous declaration of 'C'.
-// class C {
-//       ^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:45:3: Error: 'C' is already declared in this scope.
+//   C(a, b);
+//   ^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:44:3: Context: Previous declaration of 'C'.
+//   C(a);
+//   ^
 //
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:71:7: Error: 'C' is already declared in this scope.
-// class C {
-//       ^
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Context: Previous declaration of 'C'.
-// class C {
-//       ^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:48:7: Error: 'field' is already declared in this scope.
+//   var field = "2nd";
+//       ^^^^^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:46:7: Context: Previous declaration of 'field'.
+//   var field = "1st";
+//       ^^^^^
 //
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Error: 'Enum' is already declared in this scope.
-// enum Enum {
-//      ^^^^
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:75:6: Context: Previous declaration of 'Enum'.
-// enum Enum {
-//      ^^^^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:54:3: Error: 'm' is already declared in this scope.
+//   m() {
+//   ^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:50:3: Context: Previous declaration of 'm'.
+//   m() {
+//   ^
 //
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:88:6: Error: 'Enum' is already declared in this scope.
-// enum Enum {
-//      ^^^^
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Context: Previous declaration of 'Enum'.
-// enum Enum {
-//      ^^^^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:62:10: Error: 's' is already declared in this scope.
+//   static s() {
+//          ^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:58:10: Context: Previous declaration of 's'.
+//   static s() {
+//          ^
 //
 // pkg/front_end/testcases/general/duplicated_declarations.dart:70:4: Error: Name of enum constant 'Enum' can't be the same as the enum's own name.
 //   Sub() : super(null);
diff --git a/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.outline.expect b/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.outline.expect
index 6ec6302..a8b40ff 100644
--- a/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.outline.expect
+++ b/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.outline.expect
@@ -45,34 +45,6 @@
 // main() {
 // ^^^^
 //
-// pkg/front_end/testcases/general/duplicated_declarations.dart:45:3: Error: 'C' is already declared in this scope.
-//   C(a, b);
-//   ^
-// pkg/front_end/testcases/general/duplicated_declarations.dart:44:3: Context: Previous declaration of 'C'.
-//   C(a);
-//   ^
-//
-// pkg/front_end/testcases/general/duplicated_declarations.dart:48:7: Error: 'field' is already declared in this scope.
-//   var field = "2nd";
-//       ^^^^^
-// pkg/front_end/testcases/general/duplicated_declarations.dart:46:7: Context: Previous declaration of 'field'.
-//   var field = "1st";
-//       ^^^^^
-//
-// pkg/front_end/testcases/general/duplicated_declarations.dart:54:3: Error: 'm' is already declared in this scope.
-//   m() {
-//   ^
-// pkg/front_end/testcases/general/duplicated_declarations.dart:50:3: Context: Previous declaration of 'm'.
-//   m() {
-//   ^
-//
-// pkg/front_end/testcases/general/duplicated_declarations.dart:62:10: Error: 's' is already declared in this scope.
-//   static s() {
-//          ^
-// pkg/front_end/testcases/general/duplicated_declarations.dart:58:10: Context: Previous declaration of 's'.
-//   static s() {
-//          ^
-//
 // pkg/front_end/testcases/general/duplicated_declarations.dart:74:7: Error: 'C' is already declared in this scope.
 // class C {
 //       ^
@@ -186,6 +158,34 @@
 // main() {
 // ^^^^
 //
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Error: 'C' is already declared in this scope.
+// class C {
+//       ^
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:41:7: Context: Previous declaration of 'C'.
+// class C {
+//       ^
+//
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:71:7: Error: 'C' is already declared in this scope.
+// class C {
+//       ^
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Context: Previous declaration of 'C'.
+// class C {
+//       ^
+//
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Error: 'Enum' is already declared in this scope.
+// enum Enum {
+//      ^^^^
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:75:6: Context: Previous declaration of 'Enum'.
+// enum Enum {
+//      ^^^^
+//
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:88:6: Error: 'Enum' is already declared in this scope.
+// enum Enum {
+//      ^^^^
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Context: Previous declaration of 'Enum'.
+// enum Enum {
+//      ^^^^
+//
 // pkg/front_end/testcases/general/duplicated_declarations_part.dart:43:3: Error: 'C' is already declared in this scope.
 //   C(a, b);
 //   ^
@@ -214,33 +214,33 @@
 //   static s() {
 //          ^
 //
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Error: 'C' is already declared in this scope.
-// class C {
-//       ^
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:41:7: Context: Previous declaration of 'C'.
-// class C {
-//       ^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:45:3: Error: 'C' is already declared in this scope.
+//   C(a, b);
+//   ^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:44:3: Context: Previous declaration of 'C'.
+//   C(a);
+//   ^
 //
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:71:7: Error: 'C' is already declared in this scope.
-// class C {
-//       ^
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Context: Previous declaration of 'C'.
-// class C {
-//       ^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:48:7: Error: 'field' is already declared in this scope.
+//   var field = "2nd";
+//       ^^^^^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:46:7: Context: Previous declaration of 'field'.
+//   var field = "1st";
+//       ^^^^^
 //
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Error: 'Enum' is already declared in this scope.
-// enum Enum {
-//      ^^^^
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:75:6: Context: Previous declaration of 'Enum'.
-// enum Enum {
-//      ^^^^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:54:3: Error: 'm' is already declared in this scope.
+//   m() {
+//   ^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:50:3: Context: Previous declaration of 'm'.
+//   m() {
+//   ^
 //
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:88:6: Error: 'Enum' is already declared in this scope.
-// enum Enum {
-//      ^^^^
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Context: Previous declaration of 'Enum'.
-// enum Enum {
-//      ^^^^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:62:10: Error: 's' is already declared in this scope.
+//   static s() {
+//          ^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:58:10: Context: Previous declaration of 's'.
+//   static s() {
+//          ^
 //
 // pkg/front_end/testcases/general/duplicated_declarations.dart:70:4: Error: Name of enum constant 'Enum' can't be the same as the enum's own name.
 //   Sub() : super(null);
diff --git a/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.transformed.expect b/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.transformed.expect
index 880614e6..edd8810 100644
--- a/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/duplicated_declarations.dart.strong.transformed.expect
@@ -45,34 +45,6 @@
 // main() {
 // ^^^^
 //
-// pkg/front_end/testcases/general/duplicated_declarations.dart:45:3: Error: 'C' is already declared in this scope.
-//   C(a, b);
-//   ^
-// pkg/front_end/testcases/general/duplicated_declarations.dart:44:3: Context: Previous declaration of 'C'.
-//   C(a);
-//   ^
-//
-// pkg/front_end/testcases/general/duplicated_declarations.dart:48:7: Error: 'field' is already declared in this scope.
-//   var field = "2nd";
-//       ^^^^^
-// pkg/front_end/testcases/general/duplicated_declarations.dart:46:7: Context: Previous declaration of 'field'.
-//   var field = "1st";
-//       ^^^^^
-//
-// pkg/front_end/testcases/general/duplicated_declarations.dart:54:3: Error: 'm' is already declared in this scope.
-//   m() {
-//   ^
-// pkg/front_end/testcases/general/duplicated_declarations.dart:50:3: Context: Previous declaration of 'm'.
-//   m() {
-//   ^
-//
-// pkg/front_end/testcases/general/duplicated_declarations.dart:62:10: Error: 's' is already declared in this scope.
-//   static s() {
-//          ^
-// pkg/front_end/testcases/general/duplicated_declarations.dart:58:10: Context: Previous declaration of 's'.
-//   static s() {
-//          ^
-//
 // pkg/front_end/testcases/general/duplicated_declarations.dart:74:7: Error: 'C' is already declared in this scope.
 // class C {
 //       ^
@@ -186,6 +158,34 @@
 // main() {
 // ^^^^
 //
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Error: 'C' is already declared in this scope.
+// class C {
+//       ^
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:41:7: Context: Previous declaration of 'C'.
+// class C {
+//       ^
+//
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:71:7: Error: 'C' is already declared in this scope.
+// class C {
+//       ^
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Context: Previous declaration of 'C'.
+// class C {
+//       ^
+//
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Error: 'Enum' is already declared in this scope.
+// enum Enum {
+//      ^^^^
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:75:6: Context: Previous declaration of 'Enum'.
+// enum Enum {
+//      ^^^^
+//
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:88:6: Error: 'Enum' is already declared in this scope.
+// enum Enum {
+//      ^^^^
+// pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Context: Previous declaration of 'Enum'.
+// enum Enum {
+//      ^^^^
+//
 // pkg/front_end/testcases/general/duplicated_declarations_part.dart:43:3: Error: 'C' is already declared in this scope.
 //   C(a, b);
 //   ^
@@ -214,33 +214,33 @@
 //   static s() {
 //          ^
 //
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Error: 'C' is already declared in this scope.
-// class C {
-//       ^
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:41:7: Context: Previous declaration of 'C'.
-// class C {
-//       ^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:45:3: Error: 'C' is already declared in this scope.
+//   C(a, b);
+//   ^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:44:3: Context: Previous declaration of 'C'.
+//   C(a);
+//   ^
 //
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:71:7: Error: 'C' is already declared in this scope.
-// class C {
-//       ^
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:67:7: Context: Previous declaration of 'C'.
-// class C {
-//       ^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:48:7: Error: 'field' is already declared in this scope.
+//   var field = "2nd";
+//       ^^^^^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:46:7: Context: Previous declaration of 'field'.
+//   var field = "1st";
+//       ^^^^^
 //
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Error: 'Enum' is already declared in this scope.
-// enum Enum {
-//      ^^^^
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:75:6: Context: Previous declaration of 'Enum'.
-// enum Enum {
-//      ^^^^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:54:3: Error: 'm' is already declared in this scope.
+//   m() {
+//   ^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:50:3: Context: Previous declaration of 'm'.
+//   m() {
+//   ^
 //
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:88:6: Error: 'Enum' is already declared in this scope.
-// enum Enum {
-//      ^^^^
-// pkg/front_end/testcases/general/duplicated_declarations_part.dart:82:6: Context: Previous declaration of 'Enum'.
-// enum Enum {
-//      ^^^^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:62:10: Error: 's' is already declared in this scope.
+//   static s() {
+//          ^
+// pkg/front_end/testcases/general/duplicated_declarations.dart:58:10: Context: Previous declaration of 's'.
+//   static s() {
+//          ^
 //
 // pkg/front_end/testcases/general/duplicated_declarations.dart:70:4: Error: Name of enum constant 'Enum' can't be the same as the enum's own name.
 //   Sub() : super(null);
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.expect
index 2a90d65..63b90b4 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.expect
@@ -10,13 +10,6 @@
 //   foo.x() : initializer = true { }
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:5:3: Error: 'Foo.x' is already declared in this scope.
-//   foo.x() : initializer = true { }
-//   ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:3:3: Context: Previous declaration of 'Foo.x'.
-//   foo.x() { }
-//   ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:7:3: Error: The name of a constructor must match the name of the enclosing class.
 //   foo() : initializer = true { }
 //   ^^^
@@ -31,13 +24,6 @@
 //   get Foo {
 //       ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:9:7: Error: 'Foo' is already declared in this scope.
-//   get Foo {
-//       ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:8:7: Context: Previous declaration of 'Foo'.
-//   get Foo => 0;
-//       ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   get Foo.X => 0;
@@ -58,13 +44,6 @@
 //   get Foo.X {
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Error: 'Foo.X' is already declared in this scope.
-//   get Foo.X {
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'.
-//   get Foo.X => 0;
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:16:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   get Foo : bla = null => 0;
@@ -85,13 +64,6 @@
 //   get Foo.X : bla = null {
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Error: 'Foo.X' is already declared in this scope.
-//   get Foo.X : bla = null {
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Context: Previous declaration of 'Foo.X'.
-//   get Foo.X {
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:20:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   set Foo => 0;
@@ -112,13 +84,6 @@
 //   set Foo {
 //       ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:21:7: Error: 'Foo' is already declared in this scope.
-//   set Foo {
-//       ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:20:7: Context: Previous declaration of 'Foo'.
-//   set Foo => 0;
-//       ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   set Foo.X => 0;
@@ -129,13 +94,6 @@
 //   set Foo.X => 0;
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Error: 'Foo.X' is already declared in this scope.
-//   set Foo.X => 0;
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Context: Previous declaration of 'Foo.X'.
-//   get Foo.X : bla = null {
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   set Foo.X {
@@ -146,13 +104,6 @@
 //   set Foo.X {
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Error: 'Foo.X' is already declared in this scope.
-//   set Foo.X {
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Context: Previous declaration of 'Foo.X'.
-//   set Foo.X => 0;
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   set Foo : bla = null => 0;
@@ -163,13 +114,6 @@
 //   set Foo : bla = null => 0;
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Error: 'Foo' is already declared in this scope.
-//   set Foo : bla = null => 0;
-//       ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:16:7: Context: Previous declaration of 'Foo'.
-//   get Foo : bla = null => 0;
-//       ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:29:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   set Foo.X : bla = null {
@@ -180,24 +124,10 @@
 //   set Foo.X : bla = null {
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:29:7: Error: 'Foo.X' is already declared in this scope.
-//   set Foo.X : bla = null {
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Context: Previous declaration of 'Foo.X'.
-//   set Foo.X {
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:32:18: Error: An external constructor can't have any initializers.
 //   external Foo() : bla = null;
 //                  ^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:32:12: Error: 'Foo' is already declared in this scope.
-//   external Foo() : bla = null;
-//            ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Context: Previous declaration of 'Foo'.
-//   set Foo : bla = null => 0;
-//       ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:33:33: Error: An external or native method can't have a body.
 //   external Foo.X() : bla = null {
 //                                 ^
@@ -206,6 +136,86 @@
 //   external Foo.X() : bla = null {
 //                    ^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Error: A class member can't have the same name as the enclosing class.
+// Try renaming the member.
+//   int Foo;
+//       ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:37:10: Error: A class member can't have the same name as the enclosing class.
+// Try renaming the member.
+//   int A, Foo, B;
+//          ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:5:3: Error: 'Foo.x' is already declared in this scope.
+//   foo.x() : initializer = true { }
+//   ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:3:3: Context: Previous declaration of 'Foo.x'.
+//   foo.x() { }
+//   ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:9:7: Error: 'Foo' is already declared in this scope.
+//   get Foo {
+//       ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:8:7: Context: Previous declaration of 'Foo'.
+//   get Foo => 0;
+//       ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Error: 'Foo.X' is already declared in this scope.
+//   get Foo.X {
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'.
+//   get Foo.X => 0;
+//       ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Error: 'Foo.X' is already declared in this scope.
+//   get Foo.X : bla = null {
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Context: Previous declaration of 'Foo.X'.
+//   get Foo.X {
+//       ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:21:7: Error: 'Foo' is already declared in this scope.
+//   set Foo {
+//       ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:20:7: Context: Previous declaration of 'Foo'.
+//   set Foo => 0;
+//       ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Error: 'Foo.X' is already declared in this scope.
+//   set Foo.X => 0;
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Context: Previous declaration of 'Foo.X'.
+//   get Foo.X : bla = null {
+//       ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Error: 'Foo.X' is already declared in this scope.
+//   set Foo.X {
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Context: Previous declaration of 'Foo.X'.
+//   set Foo.X => 0;
+//       ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Error: 'Foo' is already declared in this scope.
+//   set Foo : bla = null => 0;
+//       ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:16:7: Context: Previous declaration of 'Foo'.
+//   get Foo : bla = null => 0;
+//       ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:29:7: Error: 'Foo.X' is already declared in this scope.
+//   set Foo.X : bla = null {
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Context: Previous declaration of 'Foo.X'.
+//   set Foo.X {
+//       ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:32:12: Error: 'Foo' is already declared in this scope.
+//   external Foo() : bla = null;
+//            ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Context: Previous declaration of 'Foo'.
+//   set Foo : bla = null => 0;
+//       ^^^
+//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:33:12: Error: 'Foo.X' is already declared in this scope.
 //   external Foo.X() : bla = null {
 //            ^^^^^
@@ -213,11 +223,6 @@
 //   set Foo.X : bla = null {
 //       ^^^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Error: A class member can't have the same name as the enclosing class.
-// Try renaming the member.
-//   int Foo;
-//       ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Error: 'Foo' is already declared in this scope.
 //   int Foo;
 //       ^^^
@@ -225,11 +230,6 @@
 //   get Foo {
 //       ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:37:10: Error: A class member can't have the same name as the enclosing class.
-// Try renaming the member.
-//   int A, Foo, B;
-//          ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:37:10: Error: 'Foo' is already declared in this scope.
 //   int A, Foo, B;
 //          ^^^
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.modular.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.modular.expect
index 2a90d65..63b90b4 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.modular.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.modular.expect
@@ -10,13 +10,6 @@
 //   foo.x() : initializer = true { }
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:5:3: Error: 'Foo.x' is already declared in this scope.
-//   foo.x() : initializer = true { }
-//   ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:3:3: Context: Previous declaration of 'Foo.x'.
-//   foo.x() { }
-//   ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:7:3: Error: The name of a constructor must match the name of the enclosing class.
 //   foo() : initializer = true { }
 //   ^^^
@@ -31,13 +24,6 @@
 //   get Foo {
 //       ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:9:7: Error: 'Foo' is already declared in this scope.
-//   get Foo {
-//       ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:8:7: Context: Previous declaration of 'Foo'.
-//   get Foo => 0;
-//       ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   get Foo.X => 0;
@@ -58,13 +44,6 @@
 //   get Foo.X {
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Error: 'Foo.X' is already declared in this scope.
-//   get Foo.X {
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'.
-//   get Foo.X => 0;
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:16:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   get Foo : bla = null => 0;
@@ -85,13 +64,6 @@
 //   get Foo.X : bla = null {
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Error: 'Foo.X' is already declared in this scope.
-//   get Foo.X : bla = null {
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Context: Previous declaration of 'Foo.X'.
-//   get Foo.X {
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:20:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   set Foo => 0;
@@ -112,13 +84,6 @@
 //   set Foo {
 //       ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:21:7: Error: 'Foo' is already declared in this scope.
-//   set Foo {
-//       ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:20:7: Context: Previous declaration of 'Foo'.
-//   set Foo => 0;
-//       ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   set Foo.X => 0;
@@ -129,13 +94,6 @@
 //   set Foo.X => 0;
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Error: 'Foo.X' is already declared in this scope.
-//   set Foo.X => 0;
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Context: Previous declaration of 'Foo.X'.
-//   get Foo.X : bla = null {
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   set Foo.X {
@@ -146,13 +104,6 @@
 //   set Foo.X {
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Error: 'Foo.X' is already declared in this scope.
-//   set Foo.X {
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Context: Previous declaration of 'Foo.X'.
-//   set Foo.X => 0;
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   set Foo : bla = null => 0;
@@ -163,13 +114,6 @@
 //   set Foo : bla = null => 0;
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Error: 'Foo' is already declared in this scope.
-//   set Foo : bla = null => 0;
-//       ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:16:7: Context: Previous declaration of 'Foo'.
-//   get Foo : bla = null => 0;
-//       ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:29:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   set Foo.X : bla = null {
@@ -180,24 +124,10 @@
 //   set Foo.X : bla = null {
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:29:7: Error: 'Foo.X' is already declared in this scope.
-//   set Foo.X : bla = null {
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Context: Previous declaration of 'Foo.X'.
-//   set Foo.X {
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:32:18: Error: An external constructor can't have any initializers.
 //   external Foo() : bla = null;
 //                  ^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:32:12: Error: 'Foo' is already declared in this scope.
-//   external Foo() : bla = null;
-//            ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Context: Previous declaration of 'Foo'.
-//   set Foo : bla = null => 0;
-//       ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:33:33: Error: An external or native method can't have a body.
 //   external Foo.X() : bla = null {
 //                                 ^
@@ -206,6 +136,86 @@
 //   external Foo.X() : bla = null {
 //                    ^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Error: A class member can't have the same name as the enclosing class.
+// Try renaming the member.
+//   int Foo;
+//       ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:37:10: Error: A class member can't have the same name as the enclosing class.
+// Try renaming the member.
+//   int A, Foo, B;
+//          ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:5:3: Error: 'Foo.x' is already declared in this scope.
+//   foo.x() : initializer = true { }
+//   ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:3:3: Context: Previous declaration of 'Foo.x'.
+//   foo.x() { }
+//   ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:9:7: Error: 'Foo' is already declared in this scope.
+//   get Foo {
+//       ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:8:7: Context: Previous declaration of 'Foo'.
+//   get Foo => 0;
+//       ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Error: 'Foo.X' is already declared in this scope.
+//   get Foo.X {
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'.
+//   get Foo.X => 0;
+//       ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Error: 'Foo.X' is already declared in this scope.
+//   get Foo.X : bla = null {
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Context: Previous declaration of 'Foo.X'.
+//   get Foo.X {
+//       ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:21:7: Error: 'Foo' is already declared in this scope.
+//   set Foo {
+//       ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:20:7: Context: Previous declaration of 'Foo'.
+//   set Foo => 0;
+//       ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Error: 'Foo.X' is already declared in this scope.
+//   set Foo.X => 0;
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Context: Previous declaration of 'Foo.X'.
+//   get Foo.X : bla = null {
+//       ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Error: 'Foo.X' is already declared in this scope.
+//   set Foo.X {
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Context: Previous declaration of 'Foo.X'.
+//   set Foo.X => 0;
+//       ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Error: 'Foo' is already declared in this scope.
+//   set Foo : bla = null => 0;
+//       ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:16:7: Context: Previous declaration of 'Foo'.
+//   get Foo : bla = null => 0;
+//       ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:29:7: Error: 'Foo.X' is already declared in this scope.
+//   set Foo.X : bla = null {
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Context: Previous declaration of 'Foo.X'.
+//   set Foo.X {
+//       ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:32:12: Error: 'Foo' is already declared in this scope.
+//   external Foo() : bla = null;
+//            ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Context: Previous declaration of 'Foo'.
+//   set Foo : bla = null => 0;
+//       ^^^
+//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:33:12: Error: 'Foo.X' is already declared in this scope.
 //   external Foo.X() : bla = null {
 //            ^^^^^
@@ -213,11 +223,6 @@
 //   set Foo.X : bla = null {
 //       ^^^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Error: A class member can't have the same name as the enclosing class.
-// Try renaming the member.
-//   int Foo;
-//       ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Error: 'Foo' is already declared in this scope.
 //   int Foo;
 //       ^^^
@@ -225,11 +230,6 @@
 //   get Foo {
 //       ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:37:10: Error: A class member can't have the same name as the enclosing class.
-// Try renaming the member.
-//   int A, Foo, B;
-//          ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:37:10: Error: 'Foo' is already declared in this scope.
 //   int A, Foo, B;
 //          ^^^
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.outline.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.outline.expect
index e42bd18..a2a75c2 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.outline.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.outline.expect
@@ -10,13 +10,6 @@
 //   foo.x() : initializer = true { }
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:5:3: Error: 'Foo.x' is already declared in this scope.
-//   foo.x() : initializer = true { }
-//   ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:3:3: Context: Previous declaration of 'Foo.x'.
-//   foo.x() { }
-//   ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:7:3: Error: The name of a constructor must match the name of the enclosing class.
 //   foo() : initializer = true { }
 //   ^^^
@@ -31,13 +24,6 @@
 //   get Foo {
 //       ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:9:7: Error: 'Foo' is already declared in this scope.
-//   get Foo {
-//       ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:8:7: Context: Previous declaration of 'Foo'.
-//   get Foo => 0;
-//       ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   get Foo.X => 0;
@@ -58,13 +44,6 @@
 //   get Foo.X {
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Error: 'Foo.X' is already declared in this scope.
-//   get Foo.X {
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'.
-//   get Foo.X => 0;
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:16:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   get Foo : bla = null => 0;
@@ -85,13 +64,6 @@
 //   get Foo.X : bla = null {
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Error: 'Foo.X' is already declared in this scope.
-//   get Foo.X : bla = null {
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Context: Previous declaration of 'Foo.X'.
-//   get Foo.X {
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:20:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   set Foo => 0;
@@ -112,13 +84,6 @@
 //   set Foo {
 //       ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:21:7: Error: 'Foo' is already declared in this scope.
-//   set Foo {
-//       ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:20:7: Context: Previous declaration of 'Foo'.
-//   set Foo => 0;
-//       ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   set Foo.X => 0;
@@ -129,13 +94,6 @@
 //   set Foo.X => 0;
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Error: 'Foo.X' is already declared in this scope.
-//   set Foo.X => 0;
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Context: Previous declaration of 'Foo.X'.
-//   get Foo.X : bla = null {
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   set Foo.X {
@@ -146,13 +104,6 @@
 //   set Foo.X {
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Error: 'Foo.X' is already declared in this scope.
-//   set Foo.X {
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Context: Previous declaration of 'Foo.X'.
-//   set Foo.X => 0;
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   set Foo : bla = null => 0;
@@ -163,13 +114,6 @@
 //   set Foo : bla = null => 0;
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Error: 'Foo' is already declared in this scope.
-//   set Foo : bla = null => 0;
-//       ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:16:7: Context: Previous declaration of 'Foo'.
-//   get Foo : bla = null => 0;
-//       ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:29:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   set Foo.X : bla = null {
@@ -180,24 +124,10 @@
 //   set Foo.X : bla = null {
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:29:7: Error: 'Foo.X' is already declared in this scope.
-//   set Foo.X : bla = null {
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Context: Previous declaration of 'Foo.X'.
-//   set Foo.X {
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:32:18: Error: An external constructor can't have any initializers.
 //   external Foo() : bla = null;
 //                  ^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:32:12: Error: 'Foo' is already declared in this scope.
-//   external Foo() : bla = null;
-//            ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Context: Previous declaration of 'Foo'.
-//   set Foo : bla = null => 0;
-//       ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:33:33: Error: An external or native method can't have a body.
 //   external Foo.X() : bla = null {
 //                                 ^
@@ -206,6 +136,86 @@
 //   external Foo.X() : bla = null {
 //                    ^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Error: A class member can't have the same name as the enclosing class.
+// Try renaming the member.
+//   int Foo;
+//       ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:37:10: Error: A class member can't have the same name as the enclosing class.
+// Try renaming the member.
+//   int A, Foo, B;
+//          ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:5:3: Error: 'Foo.x' is already declared in this scope.
+//   foo.x() : initializer = true { }
+//   ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:3:3: Context: Previous declaration of 'Foo.x'.
+//   foo.x() { }
+//   ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:9:7: Error: 'Foo' is already declared in this scope.
+//   get Foo {
+//       ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:8:7: Context: Previous declaration of 'Foo'.
+//   get Foo => 0;
+//       ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Error: 'Foo.X' is already declared in this scope.
+//   get Foo.X {
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'.
+//   get Foo.X => 0;
+//       ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Error: 'Foo.X' is already declared in this scope.
+//   get Foo.X : bla = null {
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Context: Previous declaration of 'Foo.X'.
+//   get Foo.X {
+//       ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:21:7: Error: 'Foo' is already declared in this scope.
+//   set Foo {
+//       ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:20:7: Context: Previous declaration of 'Foo'.
+//   set Foo => 0;
+//       ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Error: 'Foo.X' is already declared in this scope.
+//   set Foo.X => 0;
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Context: Previous declaration of 'Foo.X'.
+//   get Foo.X : bla = null {
+//       ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Error: 'Foo.X' is already declared in this scope.
+//   set Foo.X {
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Context: Previous declaration of 'Foo.X'.
+//   set Foo.X => 0;
+//       ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Error: 'Foo' is already declared in this scope.
+//   set Foo : bla = null => 0;
+//       ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:16:7: Context: Previous declaration of 'Foo'.
+//   get Foo : bla = null => 0;
+//       ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:29:7: Error: 'Foo.X' is already declared in this scope.
+//   set Foo.X : bla = null {
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Context: Previous declaration of 'Foo.X'.
+//   set Foo.X {
+//       ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:32:12: Error: 'Foo' is already declared in this scope.
+//   external Foo() : bla = null;
+//            ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Context: Previous declaration of 'Foo'.
+//   set Foo : bla = null => 0;
+//       ^^^
+//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:33:12: Error: 'Foo.X' is already declared in this scope.
 //   external Foo.X() : bla = null {
 //            ^^^^^
@@ -213,11 +223,6 @@
 //   set Foo.X : bla = null {
 //       ^^^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Error: A class member can't have the same name as the enclosing class.
-// Try renaming the member.
-//   int Foo;
-//       ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Error: 'Foo' is already declared in this scope.
 //   int Foo;
 //       ^^^
@@ -225,11 +230,6 @@
 //   get Foo {
 //       ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:37:10: Error: A class member can't have the same name as the enclosing class.
-// Try renaming the member.
-//   int A, Foo, B;
-//          ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:37:10: Error: 'Foo' is already declared in this scope.
 //   int A, Foo, B;
 //          ^^^
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.transformed.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.transformed.expect
index 2a90d65..63b90b4 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart.strong.transformed.expect
@@ -10,13 +10,6 @@
 //   foo.x() : initializer = true { }
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:5:3: Error: 'Foo.x' is already declared in this scope.
-//   foo.x() : initializer = true { }
-//   ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:3:3: Context: Previous declaration of 'Foo.x'.
-//   foo.x() { }
-//   ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:7:3: Error: The name of a constructor must match the name of the enclosing class.
 //   foo() : initializer = true { }
 //   ^^^
@@ -31,13 +24,6 @@
 //   get Foo {
 //       ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:9:7: Error: 'Foo' is already declared in this scope.
-//   get Foo {
-//       ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:8:7: Context: Previous declaration of 'Foo'.
-//   get Foo => 0;
-//       ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   get Foo.X => 0;
@@ -58,13 +44,6 @@
 //   get Foo.X {
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Error: 'Foo.X' is already declared in this scope.
-//   get Foo.X {
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'.
-//   get Foo.X => 0;
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:16:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   get Foo : bla = null => 0;
@@ -85,13 +64,6 @@
 //   get Foo.X : bla = null {
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Error: 'Foo.X' is already declared in this scope.
-//   get Foo.X : bla = null {
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Context: Previous declaration of 'Foo.X'.
-//   get Foo.X {
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:20:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   set Foo => 0;
@@ -112,13 +84,6 @@
 //   set Foo {
 //       ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:21:7: Error: 'Foo' is already declared in this scope.
-//   set Foo {
-//       ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:20:7: Context: Previous declaration of 'Foo'.
-//   set Foo => 0;
-//       ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   set Foo.X => 0;
@@ -129,13 +94,6 @@
 //   set Foo.X => 0;
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Error: 'Foo.X' is already declared in this scope.
-//   set Foo.X => 0;
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Context: Previous declaration of 'Foo.X'.
-//   get Foo.X : bla = null {
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   set Foo.X {
@@ -146,13 +104,6 @@
 //   set Foo.X {
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Error: 'Foo.X' is already declared in this scope.
-//   set Foo.X {
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Context: Previous declaration of 'Foo.X'.
-//   set Foo.X => 0;
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   set Foo : bla = null => 0;
@@ -163,13 +114,6 @@
 //   set Foo : bla = null => 0;
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Error: 'Foo' is already declared in this scope.
-//   set Foo : bla = null => 0;
-//       ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:16:7: Context: Previous declaration of 'Foo'.
-//   get Foo : bla = null => 0;
-//       ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:29:7: Error: A method declaration needs an explicit list of parameters.
 // Try adding a parameter list to the method declaration.
 //   set Foo.X : bla = null {
@@ -180,24 +124,10 @@
 //   set Foo.X : bla = null {
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:29:7: Error: 'Foo.X' is already declared in this scope.
-//   set Foo.X : bla = null {
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Context: Previous declaration of 'Foo.X'.
-//   set Foo.X {
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:32:18: Error: An external constructor can't have any initializers.
 //   external Foo() : bla = null;
 //                  ^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:32:12: Error: 'Foo' is already declared in this scope.
-//   external Foo() : bla = null;
-//            ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Context: Previous declaration of 'Foo'.
-//   set Foo : bla = null => 0;
-//       ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:33:33: Error: An external or native method can't have a body.
 //   external Foo.X() : bla = null {
 //                                 ^
@@ -206,6 +136,86 @@
 //   external Foo.X() : bla = null {
 //                    ^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Error: A class member can't have the same name as the enclosing class.
+// Try renaming the member.
+//   int Foo;
+//       ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:37:10: Error: A class member can't have the same name as the enclosing class.
+// Try renaming the member.
+//   int A, Foo, B;
+//          ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:5:3: Error: 'Foo.x' is already declared in this scope.
+//   foo.x() : initializer = true { }
+//   ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:3:3: Context: Previous declaration of 'Foo.x'.
+//   foo.x() { }
+//   ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:9:7: Error: 'Foo' is already declared in this scope.
+//   get Foo {
+//       ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:8:7: Context: Previous declaration of 'Foo'.
+//   get Foo => 0;
+//       ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Error: 'Foo.X' is already declared in this scope.
+//   get Foo.X {
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:12:7: Context: Previous declaration of 'Foo.X'.
+//   get Foo.X => 0;
+//       ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Error: 'Foo.X' is already declared in this scope.
+//   get Foo.X : bla = null {
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:13:7: Context: Previous declaration of 'Foo.X'.
+//   get Foo.X {
+//       ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:21:7: Error: 'Foo' is already declared in this scope.
+//   set Foo {
+//       ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:20:7: Context: Previous declaration of 'Foo'.
+//   set Foo => 0;
+//       ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Error: 'Foo.X' is already declared in this scope.
+//   set Foo.X => 0;
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:17:7: Context: Previous declaration of 'Foo.X'.
+//   get Foo.X : bla = null {
+//       ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Error: 'Foo.X' is already declared in this scope.
+//   set Foo.X {
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:24:7: Context: Previous declaration of 'Foo.X'.
+//   set Foo.X => 0;
+//       ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Error: 'Foo' is already declared in this scope.
+//   set Foo : bla = null => 0;
+//       ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:16:7: Context: Previous declaration of 'Foo'.
+//   get Foo : bla = null => 0;
+//       ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:29:7: Error: 'Foo.X' is already declared in this scope.
+//   set Foo.X : bla = null {
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:25:7: Context: Previous declaration of 'Foo.X'.
+//   set Foo.X {
+//       ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:32:12: Error: 'Foo' is already declared in this scope.
+//   external Foo() : bla = null;
+//            ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:28:7: Context: Previous declaration of 'Foo'.
+//   set Foo : bla = null => 0;
+//       ^^^
+//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:33:12: Error: 'Foo.X' is already declared in this scope.
 //   external Foo.X() : bla = null {
 //            ^^^^^
@@ -213,11 +223,6 @@
 //   set Foo.X : bla = null {
 //       ^^^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Error: A class member can't have the same name as the enclosing class.
-// Try renaming the member.
-//   int Foo;
-//       ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:36:7: Error: 'Foo' is already declared in this scope.
 //   int Foo;
 //       ^^^
@@ -225,11 +230,6 @@
 //   get Foo {
 //       ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:37:10: Error: A class member can't have the same name as the enclosing class.
-// Try renaming the member.
-//   int A, Foo, B;
-//          ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_general.crash_dart:37:10: Error: 'Foo' is already declared in this scope.
 //   int A, Foo, B;
 //          ^^^
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart.strong.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart.strong.expect
index 975e038..d0c189b 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart.strong.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart.strong.expect
@@ -20,13 +20,6 @@
 //   get foo.x() : initializer = true { }
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:5:7: Error: 'Foo.x' is already declared in this scope.
-//   get foo.x() : initializer = true { }
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:3:7: Context: Previous declaration of 'Foo.x'.
-//   get foo.x() { }
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:7:10: Error: A getter can't have formal parameters.
 // Try removing '(...)'.
 //   get foo() : initializer = true { }
@@ -41,6 +34,13 @@
 //   get foo() : initializer = true { }
 //   ^^^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:5:7: Error: 'Foo.x' is already declared in this scope.
+//   get foo.x() : initializer = true { }
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:3:7: Context: Previous declaration of 'Foo.x'.
+//   get foo.x() { }
+//       ^^^^^
+//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:5:17: Error: 'initializer' isn't an instance field of this class.
 //   get foo.x() : initializer = true { }
 //                 ^^^^^^^^^^^
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart.strong.modular.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart.strong.modular.expect
index 975e038..d0c189b 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart.strong.modular.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart.strong.modular.expect
@@ -20,13 +20,6 @@
 //   get foo.x() : initializer = true { }
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:5:7: Error: 'Foo.x' is already declared in this scope.
-//   get foo.x() : initializer = true { }
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:3:7: Context: Previous declaration of 'Foo.x'.
-//   get foo.x() { }
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:7:10: Error: A getter can't have formal parameters.
 // Try removing '(...)'.
 //   get foo() : initializer = true { }
@@ -41,6 +34,13 @@
 //   get foo() : initializer = true { }
 //   ^^^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:5:7: Error: 'Foo.x' is already declared in this scope.
+//   get foo.x() : initializer = true { }
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:3:7: Context: Previous declaration of 'Foo.x'.
+//   get foo.x() { }
+//       ^^^^^
+//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:5:17: Error: 'initializer' isn't an instance field of this class.
 //   get foo.x() : initializer = true { }
 //                 ^^^^^^^^^^^
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart.strong.outline.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart.strong.outline.expect
index 7aeb388..e52c53b 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart.strong.outline.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart.strong.outline.expect
@@ -20,13 +20,6 @@
 //   get foo.x() : initializer = true { }
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:5:7: Error: 'Foo.x' is already declared in this scope.
-//   get foo.x() : initializer = true { }
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:3:7: Context: Previous declaration of 'Foo.x'.
-//   get foo.x() { }
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:7:10: Error: A getter can't have formal parameters.
 // Try removing '(...)'.
 //   get foo() : initializer = true { }
@@ -41,6 +34,13 @@
 //   get foo() : initializer = true { }
 //   ^^^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:5:7: Error: 'Foo.x' is already declared in this scope.
+//   get foo.x() : initializer = true { }
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:3:7: Context: Previous declaration of 'Foo.x'.
+//   get foo.x() { }
+//       ^^^^^
+//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart.strong.transformed.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart.strong.transformed.expect
index 975e038..d0c189b 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart.strong.transformed.expect
@@ -20,13 +20,6 @@
 //   get foo.x() : initializer = true { }
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:5:7: Error: 'Foo.x' is already declared in this scope.
-//   get foo.x() : initializer = true { }
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:3:7: Context: Previous declaration of 'Foo.x'.
-//   get foo.x() { }
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:7:10: Error: A getter can't have formal parameters.
 // Try removing '(...)'.
 //   get foo() : initializer = true { }
@@ -41,6 +34,13 @@
 //   get foo() : initializer = true { }
 //   ^^^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:5:7: Error: 'Foo.x' is already declared in this scope.
+//   get foo.x() : initializer = true { }
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:3:7: Context: Previous declaration of 'Foo.x'.
+//   get foo.x() { }
+//       ^^^^^
+//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_get.crash_dart:5:17: Error: 'initializer' isn't an instance field of this class.
 //   get foo.x() : initializer = true { }
 //                 ^^^^^^^^^^^
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart.strong.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart.strong.expect
index a493a2b..6aeffa7 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart.strong.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart.strong.expect
@@ -20,13 +20,6 @@
 //   void foo.x() : initializer = true { }
 //   ^^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:5:8: Error: 'Foo.x' is already declared in this scope.
-//   void foo.x() : initializer = true { }
-//        ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:3:8: Context: Previous declaration of 'Foo.x'.
-//   void foo.x() { }
-//        ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:7:8: Error: The name of a constructor must match the name of the enclosing class.
 //   void foo() : initializer = true {}
 //        ^^^
@@ -36,6 +29,13 @@
 //   void foo() : initializer = true {}
 //   ^^^^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:5:8: Error: 'Foo.x' is already declared in this scope.
+//   void foo.x() : initializer = true { }
+//        ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:3:8: Context: Previous declaration of 'Foo.x'.
+//   void foo.x() { }
+//        ^^^^^
+//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:5:18: Error: 'initializer' isn't an instance field of this class.
 //   void foo.x() : initializer = true { }
 //                  ^^^^^^^^^^^
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart.strong.modular.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart.strong.modular.expect
index a493a2b..6aeffa7 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart.strong.modular.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart.strong.modular.expect
@@ -20,13 +20,6 @@
 //   void foo.x() : initializer = true { }
 //   ^^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:5:8: Error: 'Foo.x' is already declared in this scope.
-//   void foo.x() : initializer = true { }
-//        ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:3:8: Context: Previous declaration of 'Foo.x'.
-//   void foo.x() { }
-//        ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:7:8: Error: The name of a constructor must match the name of the enclosing class.
 //   void foo() : initializer = true {}
 //        ^^^
@@ -36,6 +29,13 @@
 //   void foo() : initializer = true {}
 //   ^^^^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:5:8: Error: 'Foo.x' is already declared in this scope.
+//   void foo.x() : initializer = true { }
+//        ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:3:8: Context: Previous declaration of 'Foo.x'.
+//   void foo.x() { }
+//        ^^^^^
+//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:5:18: Error: 'initializer' isn't an instance field of this class.
 //   void foo.x() : initializer = true { }
 //                  ^^^^^^^^^^^
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart.strong.outline.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart.strong.outline.expect
index cff86f1..5214ca3 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart.strong.outline.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart.strong.outline.expect
@@ -20,13 +20,6 @@
 //   void foo.x() : initializer = true { }
 //   ^^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:5:8: Error: 'Foo.x' is already declared in this scope.
-//   void foo.x() : initializer = true { }
-//        ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:3:8: Context: Previous declaration of 'Foo.x'.
-//   void foo.x() { }
-//        ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:7:8: Error: The name of a constructor must match the name of the enclosing class.
 //   void foo() : initializer = true {}
 //        ^^^
@@ -36,6 +29,13 @@
 //   void foo() : initializer = true {}
 //   ^^^^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:5:8: Error: 'Foo.x' is already declared in this scope.
+//   void foo.x() : initializer = true { }
+//        ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:3:8: Context: Previous declaration of 'Foo.x'.
+//   void foo.x() { }
+//        ^^^^^
+//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart.strong.transformed.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart.strong.transformed.expect
index a493a2b..6aeffa7 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart.strong.transformed.expect
@@ -20,13 +20,6 @@
 //   void foo.x() : initializer = true { }
 //   ^^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:5:8: Error: 'Foo.x' is already declared in this scope.
-//   void foo.x() : initializer = true { }
-//        ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:3:8: Context: Previous declaration of 'Foo.x'.
-//   void foo.x() { }
-//        ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:7:8: Error: The name of a constructor must match the name of the enclosing class.
 //   void foo() : initializer = true {}
 //        ^^^
@@ -36,6 +29,13 @@
 //   void foo() : initializer = true {}
 //   ^^^^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:5:8: Error: 'Foo.x' is already declared in this scope.
+//   void foo.x() : initializer = true { }
+//        ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:3:8: Context: Previous declaration of 'Foo.x'.
+//   void foo.x() { }
+//        ^^^^^
+//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_return_type.crash_dart:5:18: Error: 'initializer' isn't an instance field of this class.
 //   void foo.x() : initializer = true { }
 //                  ^^^^^^^^^^^
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart.strong.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart.strong.expect
index be5e982..2c16aea 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart.strong.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart.strong.expect
@@ -20,13 +20,6 @@
 //   set foo.x() : initializer = true { }
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:5:7: Error: 'Foo.x' is already declared in this scope.
-//   set foo.x() : initializer = true { }
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:3:7: Context: Previous declaration of 'Foo.x'.
-//   set foo.x() { }
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:7:7: Error: The name of a constructor must match the name of the enclosing class.
 //   set foo() : initializer = true { }
 //       ^^^
@@ -36,6 +29,13 @@
 //   set foo() : initializer = true { }
 //   ^^^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:5:7: Error: 'Foo.x' is already declared in this scope.
+//   set foo.x() : initializer = true { }
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:3:7: Context: Previous declaration of 'Foo.x'.
+//   set foo.x() { }
+//       ^^^^^
+//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:5:17: Error: 'initializer' isn't an instance field of this class.
 //   set foo.x() : initializer = true { }
 //                 ^^^^^^^^^^^
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart.strong.modular.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart.strong.modular.expect
index be5e982..2c16aea 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart.strong.modular.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart.strong.modular.expect
@@ -20,13 +20,6 @@
 //   set foo.x() : initializer = true { }
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:5:7: Error: 'Foo.x' is already declared in this scope.
-//   set foo.x() : initializer = true { }
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:3:7: Context: Previous declaration of 'Foo.x'.
-//   set foo.x() { }
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:7:7: Error: The name of a constructor must match the name of the enclosing class.
 //   set foo() : initializer = true { }
 //       ^^^
@@ -36,6 +29,13 @@
 //   set foo() : initializer = true { }
 //   ^^^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:5:7: Error: 'Foo.x' is already declared in this scope.
+//   set foo.x() : initializer = true { }
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:3:7: Context: Previous declaration of 'Foo.x'.
+//   set foo.x() { }
+//       ^^^^^
+//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:5:17: Error: 'initializer' isn't an instance field of this class.
 //   set foo.x() : initializer = true { }
 //                 ^^^^^^^^^^^
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart.strong.outline.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart.strong.outline.expect
index f24dd22..bbca17c 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart.strong.outline.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart.strong.outline.expect
@@ -20,13 +20,6 @@
 //   set foo.x() : initializer = true { }
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:5:7: Error: 'Foo.x' is already declared in this scope.
-//   set foo.x() : initializer = true { }
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:3:7: Context: Previous declaration of 'Foo.x'.
-//   set foo.x() { }
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:7:7: Error: The name of a constructor must match the name of the enclosing class.
 //   set foo() : initializer = true { }
 //       ^^^
@@ -36,6 +29,13 @@
 //   set foo() : initializer = true { }
 //   ^^^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:5:7: Error: 'Foo.x' is already declared in this scope.
+//   set foo.x() : initializer = true { }
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:3:7: Context: Previous declaration of 'Foo.x'.
+//   set foo.x() { }
+//       ^^^^^
+//
 import self as self;
 import "dart:core" as core;
 
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart.strong.transformed.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart.strong.transformed.expect
index be5e982..2c16aea 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart.strong.transformed.expect
@@ -20,13 +20,6 @@
 //   set foo.x() : initializer = true { }
 //   ^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:5:7: Error: 'Foo.x' is already declared in this scope.
-//   set foo.x() : initializer = true { }
-//       ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:3:7: Context: Previous declaration of 'Foo.x'.
-//   set foo.x() { }
-//       ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:7:7: Error: The name of a constructor must match the name of the enclosing class.
 //   set foo() : initializer = true { }
 //       ^^^
@@ -36,6 +29,13 @@
 //   set foo() : initializer = true { }
 //   ^^^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:5:7: Error: 'Foo.x' is already declared in this scope.
+//   set foo.x() : initializer = true { }
+//       ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:3:7: Context: Previous declaration of 'Foo.x'.
+//   set foo.x() { }
+//       ^^^^^
+//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_bad_name_set.crash_dart:5:17: Error: 'initializer' isn't an instance field of this class.
 //   set foo.x() : initializer = true { }
 //                 ^^^^^^^^^^^
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.expect
index a2708af..d62312c 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.expect
@@ -28,13 +28,6 @@
 //   Foo()./ : super() {}
 //        ^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:3: Error: 'Foo' is already declared in this scope.
-//   Foo()./ : super() {}
-//   ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:3: Context: Previous declaration of 'Foo'.
-//   Foo() / : super() {}
-//   ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:8: Error: Expected a class member, but got '.'.
 //   Foo()./ : super() {}
 //        ^
@@ -57,13 +50,6 @@
 //   Foo()./ : super() {}
 //         ^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:9: Error: 'Foo./' is already declared in this scope.
-//   Foo()./ : super() {}
-//         ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:9: Context: Previous declaration of 'Foo./'.
-//   Foo() / : super() {}
-//         ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:9: Error: Expected '{' before this.
 //   foo() / : super() {}
 //         ^
@@ -86,24 +72,10 @@
 //   foo() / : super() {}
 //         ^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:9: Error: 'Foo./' is already declared in this scope.
-//   foo() / : super() {}
-//         ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:9: Context: Previous declaration of 'Foo./'.
-//   Foo()./ : super() {}
-//         ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:8: Error: Expected '{' before this.
 //   foo()./ : super() {}
 //        ^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:3: Error: 'foo' is already declared in this scope.
-//   foo()./ : super() {}
-//   ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:3: Context: Previous declaration of 'foo'.
-//   foo() / : super() {}
-//   ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:8: Error: Expected a class member, but got '.'.
 //   foo()./ : super() {}
 //        ^
@@ -126,6 +98,34 @@
 //   foo()./ : super() {}
 //         ^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:3: Error: 'Foo' is already declared in this scope.
+//   Foo()./ : super() {}
+//   ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:3: Context: Previous declaration of 'Foo'.
+//   Foo() / : super() {}
+//   ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:9: Error: 'Foo./' is already declared in this scope.
+//   Foo()./ : super() {}
+//         ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:9: Context: Previous declaration of 'Foo./'.
+//   Foo() / : super() {}
+//         ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:9: Error: 'Foo./' is already declared in this scope.
+//   foo() / : super() {}
+//         ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:9: Context: Previous declaration of 'Foo./'.
+//   Foo()./ : super() {}
+//         ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:3: Error: 'foo' is already declared in this scope.
+//   foo()./ : super() {}
+//   ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:3: Context: Previous declaration of 'foo'.
+//   foo() / : super() {}
+//   ^^^
+//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:9: Error: 'Foo./' is already declared in this scope.
 //   foo()./ : super() {}
 //         ^^^^^
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.modular.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.modular.expect
index a2708af..d62312c 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.modular.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.modular.expect
@@ -28,13 +28,6 @@
 //   Foo()./ : super() {}
 //        ^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:3: Error: 'Foo' is already declared in this scope.
-//   Foo()./ : super() {}
-//   ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:3: Context: Previous declaration of 'Foo'.
-//   Foo() / : super() {}
-//   ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:8: Error: Expected a class member, but got '.'.
 //   Foo()./ : super() {}
 //        ^
@@ -57,13 +50,6 @@
 //   Foo()./ : super() {}
 //         ^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:9: Error: 'Foo./' is already declared in this scope.
-//   Foo()./ : super() {}
-//         ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:9: Context: Previous declaration of 'Foo./'.
-//   Foo() / : super() {}
-//         ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:9: Error: Expected '{' before this.
 //   foo() / : super() {}
 //         ^
@@ -86,24 +72,10 @@
 //   foo() / : super() {}
 //         ^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:9: Error: 'Foo./' is already declared in this scope.
-//   foo() / : super() {}
-//         ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:9: Context: Previous declaration of 'Foo./'.
-//   Foo()./ : super() {}
-//         ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:8: Error: Expected '{' before this.
 //   foo()./ : super() {}
 //        ^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:3: Error: 'foo' is already declared in this scope.
-//   foo()./ : super() {}
-//   ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:3: Context: Previous declaration of 'foo'.
-//   foo() / : super() {}
-//   ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:8: Error: Expected a class member, but got '.'.
 //   foo()./ : super() {}
 //        ^
@@ -126,6 +98,34 @@
 //   foo()./ : super() {}
 //         ^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:3: Error: 'Foo' is already declared in this scope.
+//   Foo()./ : super() {}
+//   ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:3: Context: Previous declaration of 'Foo'.
+//   Foo() / : super() {}
+//   ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:9: Error: 'Foo./' is already declared in this scope.
+//   Foo()./ : super() {}
+//         ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:9: Context: Previous declaration of 'Foo./'.
+//   Foo() / : super() {}
+//         ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:9: Error: 'Foo./' is already declared in this scope.
+//   foo() / : super() {}
+//         ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:9: Context: Previous declaration of 'Foo./'.
+//   Foo()./ : super() {}
+//         ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:3: Error: 'foo' is already declared in this scope.
+//   foo()./ : super() {}
+//   ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:3: Context: Previous declaration of 'foo'.
+//   foo() / : super() {}
+//   ^^^
+//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:9: Error: 'Foo./' is already declared in this scope.
 //   foo()./ : super() {}
 //         ^^^^^
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.outline.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.outline.expect
index 76a0f92..02a051b 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.outline.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.outline.expect
@@ -28,13 +28,6 @@
 //   Foo()./ : super() {}
 //        ^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:3: Error: 'Foo' is already declared in this scope.
-//   Foo()./ : super() {}
-//   ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:3: Context: Previous declaration of 'Foo'.
-//   Foo() / : super() {}
-//   ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:8: Error: Expected a class member, but got '.'.
 //   Foo()./ : super() {}
 //        ^
@@ -57,13 +50,6 @@
 //   Foo()./ : super() {}
 //         ^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:9: Error: 'Foo./' is already declared in this scope.
-//   Foo()./ : super() {}
-//         ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:9: Context: Previous declaration of 'Foo./'.
-//   Foo() / : super() {}
-//         ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:9: Error: Expected '{' before this.
 //   foo() / : super() {}
 //         ^
@@ -86,24 +72,10 @@
 //   foo() / : super() {}
 //         ^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:9: Error: 'Foo./' is already declared in this scope.
-//   foo() / : super() {}
-//         ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:9: Context: Previous declaration of 'Foo./'.
-//   Foo()./ : super() {}
-//         ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:8: Error: Expected '{' before this.
 //   foo()./ : super() {}
 //        ^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:3: Error: 'foo' is already declared in this scope.
-//   foo()./ : super() {}
-//   ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:3: Context: Previous declaration of 'foo'.
-//   foo() / : super() {}
-//   ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:8: Error: Expected a class member, but got '.'.
 //   foo()./ : super() {}
 //        ^
@@ -126,6 +98,34 @@
 //   foo()./ : super() {}
 //         ^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:3: Error: 'Foo' is already declared in this scope.
+//   Foo()./ : super() {}
+//   ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:3: Context: Previous declaration of 'Foo'.
+//   Foo() / : super() {}
+//   ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:9: Error: 'Foo./' is already declared in this scope.
+//   Foo()./ : super() {}
+//         ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:9: Context: Previous declaration of 'Foo./'.
+//   Foo() / : super() {}
+//         ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:9: Error: 'Foo./' is already declared in this scope.
+//   foo() / : super() {}
+//         ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:9: Context: Previous declaration of 'Foo./'.
+//   Foo()./ : super() {}
+//         ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:3: Error: 'foo' is already declared in this scope.
+//   foo()./ : super() {}
+//   ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:3: Context: Previous declaration of 'foo'.
+//   foo() / : super() {}
+//   ^^^
+//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:9: Error: 'Foo./' is already declared in this scope.
 //   foo()./ : super() {}
 //         ^^^^^
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.transformed.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.transformed.expect
index a2708af..d62312c 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart.strong.transformed.expect
@@ -28,13 +28,6 @@
 //   Foo()./ : super() {}
 //        ^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:3: Error: 'Foo' is already declared in this scope.
-//   Foo()./ : super() {}
-//   ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:3: Context: Previous declaration of 'Foo'.
-//   Foo() / : super() {}
-//   ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:8: Error: Expected a class member, but got '.'.
 //   Foo()./ : super() {}
 //        ^
@@ -57,13 +50,6 @@
 //   Foo()./ : super() {}
 //         ^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:9: Error: 'Foo./' is already declared in this scope.
-//   Foo()./ : super() {}
-//         ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:9: Context: Previous declaration of 'Foo./'.
-//   Foo() / : super() {}
-//         ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:9: Error: Expected '{' before this.
 //   foo() / : super() {}
 //         ^
@@ -86,24 +72,10 @@
 //   foo() / : super() {}
 //         ^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:9: Error: 'Foo./' is already declared in this scope.
-//   foo() / : super() {}
-//         ^^^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:9: Context: Previous declaration of 'Foo./'.
-//   Foo()./ : super() {}
-//         ^^^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:8: Error: Expected '{' before this.
 //   foo()./ : super() {}
 //        ^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:3: Error: 'foo' is already declared in this scope.
-//   foo()./ : super() {}
-//   ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:3: Context: Previous declaration of 'foo'.
-//   foo() / : super() {}
-//   ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:8: Error: Expected a class member, but got '.'.
 //   foo()./ : super() {}
 //        ^
@@ -126,6 +98,34 @@
 //   foo()./ : super() {}
 //         ^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:3: Error: 'Foo' is already declared in this scope.
+//   Foo()./ : super() {}
+//   ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:3: Context: Previous declaration of 'Foo'.
+//   Foo() / : super() {}
+//   ^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:9: Error: 'Foo./' is already declared in this scope.
+//   Foo()./ : super() {}
+//         ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:3:9: Context: Previous declaration of 'Foo./'.
+//   Foo() / : super() {}
+//         ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:9: Error: 'Foo./' is already declared in this scope.
+//   foo() / : super() {}
+//         ^^^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:5:9: Context: Previous declaration of 'Foo./'.
+//   Foo()./ : super() {}
+//         ^^^^^
+//
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:3: Error: 'foo' is already declared in this scope.
+//   foo()./ : super() {}
+//   ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:7:3: Context: Previous declaration of 'foo'.
+//   foo() / : super() {}
+//   ^^^
+//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_operator.crash_dart:9:9: Error: 'Foo./' is already declared in this scope.
 //   foo()./ : super() {}
 //         ^^^^^
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart.strong.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart.strong.expect
index d1ada3b..5c25dea 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart.strong.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart.strong.expect
@@ -12,13 +12,6 @@
 //   void Foo() : initializer = true {}
 //   ^^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:5:8: Error: 'Foo' is already declared in this scope.
-//   void Foo() : initializer = true {}
-//        ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:3:8: Context: Previous declaration of 'Foo'.
-//   void Foo() {}
-//        ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:7:3: Error: Constructors can't have a return type.
 // Try removing the return type.
 //   void Foo.x() {}
@@ -29,6 +22,13 @@
 //   void Foo.x() : initializer = true {}
 //   ^^^^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:5:8: Error: 'Foo' is already declared in this scope.
+//   void Foo() : initializer = true {}
+//        ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:3:8: Context: Previous declaration of 'Foo'.
+//   void Foo() {}
+//        ^^^
+//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:9:8: Error: 'Foo.x' is already declared in this scope.
 //   void Foo.x() : initializer = true {}
 //        ^^^^^
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart.strong.modular.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart.strong.modular.expect
index d1ada3b..5c25dea 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart.strong.modular.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart.strong.modular.expect
@@ -12,13 +12,6 @@
 //   void Foo() : initializer = true {}
 //   ^^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:5:8: Error: 'Foo' is already declared in this scope.
-//   void Foo() : initializer = true {}
-//        ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:3:8: Context: Previous declaration of 'Foo'.
-//   void Foo() {}
-//        ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:7:3: Error: Constructors can't have a return type.
 // Try removing the return type.
 //   void Foo.x() {}
@@ -29,6 +22,13 @@
 //   void Foo.x() : initializer = true {}
 //   ^^^^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:5:8: Error: 'Foo' is already declared in this scope.
+//   void Foo() : initializer = true {}
+//        ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:3:8: Context: Previous declaration of 'Foo'.
+//   void Foo() {}
+//        ^^^
+//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:9:8: Error: 'Foo.x' is already declared in this scope.
 //   void Foo.x() : initializer = true {}
 //        ^^^^^
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart.strong.outline.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart.strong.outline.expect
index 4599e47..df60822 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart.strong.outline.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart.strong.outline.expect
@@ -12,13 +12,6 @@
 //   void Foo() : initializer = true {}
 //   ^^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:5:8: Error: 'Foo' is already declared in this scope.
-//   void Foo() : initializer = true {}
-//        ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:3:8: Context: Previous declaration of 'Foo'.
-//   void Foo() {}
-//        ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:7:3: Error: Constructors can't have a return type.
 // Try removing the return type.
 //   void Foo.x() {}
@@ -29,6 +22,13 @@
 //   void Foo.x() : initializer = true {}
 //   ^^^^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:5:8: Error: 'Foo' is already declared in this scope.
+//   void Foo() : initializer = true {}
+//        ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:3:8: Context: Previous declaration of 'Foo'.
+//   void Foo() {}
+//        ^^^
+//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:9:8: Error: 'Foo.x' is already declared in this scope.
 //   void Foo.x() : initializer = true {}
 //        ^^^^^
diff --git a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart.strong.transformed.expect b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart.strong.transformed.expect
index d1ada3b..5c25dea 100644
--- a/pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart.strong.transformed.expect
@@ -12,13 +12,6 @@
 //   void Foo() : initializer = true {}
 //   ^^^^
 //
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:5:8: Error: 'Foo' is already declared in this scope.
-//   void Foo() : initializer = true {}
-//        ^^^
-// pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:3:8: Context: Previous declaration of 'Foo'.
-//   void Foo() {}
-//        ^^^
-//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:7:3: Error: Constructors can't have a return type.
 // Try removing the return type.
 //   void Foo.x() {}
@@ -29,6 +22,13 @@
 //   void Foo.x() : initializer = true {}
 //   ^^^^
 //
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:5:8: Error: 'Foo' is already declared in this scope.
+//   void Foo() : initializer = true {}
+//        ^^^
+// pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:3:8: Context: Previous declaration of 'Foo'.
+//   void Foo() {}
+//        ^^^
+//
 // pkg/front_end/testcases/general/error_recovery/constructor_recovery_return_type.dart:9:8: Error: 'Foo.x' is already declared in this scope.
 //   void Foo.x() : initializer = true {}
 //        ^^^^^
diff --git a/pkg/front_end/testcases/general/issue41842.dart.strong.expect b/pkg/front_end/testcases/general/issue41842.dart.strong.expect
index 253d144..2b09263 100644
--- a/pkg/front_end/testcases/general/issue41842.dart.strong.expect
+++ b/pkg/front_end/testcases/general/issue41842.dart.strong.expect
@@ -50,13 +50,6 @@
 //   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
 //                                        ^
 //
-// pkg/front_end/testcases/general/issue41842.dart:18:40: Error: 'T' is already declared in this scope.
-//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
-//                                        ^
-// pkg/front_end/testcases/general/issue41842.dart:16:39: Context: Previous declaration of 'T'.
-//   factory A.foo8(int x) = lib.Foo.foo<T>; // Error. Not allowed by parser.
-//                                       ^
-//
 // pkg/front_end/testcases/general/issue41842.dart:18:41: Error: Operator declarations must be preceded by the keyword 'operator'.
 // Try adding the keyword 'operator'.
 //   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
@@ -71,13 +64,6 @@
 //   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
 //                                         ^
 //
-// pkg/front_end/testcases/general/issue41842.dart:18:41: Error: '>' is already declared in this scope.
-//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
-//                                         ^
-// pkg/front_end/testcases/general/issue41842.dart:16:40: Context: Previous declaration of '>'.
-//   factory A.foo8(int x) = lib.Foo.foo<T>; // Error. Not allowed by parser.
-//                                        ^
-//
 // pkg/front_end/testcases/general/issue41842.dart:20:33: Error: Expected ';' after this.
 //   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
 //                                 ^^^
@@ -95,13 +81,6 @@
 //   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
 //                                     ^
 //
-// pkg/front_end/testcases/general/issue41842.dart:20:37: Error: 'T' is already declared in this scope.
-//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
-//                                     ^
-// pkg/front_end/testcases/general/issue41842.dart:18:40: Context: Previous declaration of 'T'.
-//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
-//                                        ^
-//
 // pkg/front_end/testcases/general/issue41842.dart:20:38: Error: Operator declarations must be preceded by the keyword 'operator'.
 // Try adding the keyword 'operator'.
 //   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
@@ -116,13 +95,6 @@
 //   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
 //                                      ^
 //
-// pkg/front_end/testcases/general/issue41842.dart:20:38: Error: '>' is already declared in this scope.
-//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
-//                                      ^
-// pkg/front_end/testcases/general/issue41842.dart:18:41: Context: Previous declaration of '>'.
-//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
-//                                         ^
-//
 // pkg/front_end/testcases/general/issue41842.dart:21:33: Error: Expected ';' after this.
 //   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
 //                                 ^^^
@@ -140,13 +112,6 @@
 //   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
 //                                     ^
 //
-// pkg/front_end/testcases/general/issue41842.dart:21:37: Error: 'T' is already declared in this scope.
-//   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
-//                                     ^
-// pkg/front_end/testcases/general/issue41842.dart:20:37: Context: Previous declaration of 'T'.
-//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
-//                                     ^
-//
 // pkg/front_end/testcases/general/issue41842.dart:21:38: Error: Operator declarations must be preceded by the keyword 'operator'.
 // Try adding the keyword 'operator'.
 //   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
@@ -161,6 +126,41 @@
 //   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
 //                                      ^
 //
+// pkg/front_end/testcases/general/issue41842.dart:18:40: Error: 'T' is already declared in this scope.
+//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
+//                                        ^
+// pkg/front_end/testcases/general/issue41842.dart:16:39: Context: Previous declaration of 'T'.
+//   factory A.foo8(int x) = lib.Foo.foo<T>; // Error. Not allowed by parser.
+//                                       ^
+//
+// pkg/front_end/testcases/general/issue41842.dart:18:41: Error: '>' is already declared in this scope.
+//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
+//                                         ^
+// pkg/front_end/testcases/general/issue41842.dart:16:40: Context: Previous declaration of '>'.
+//   factory A.foo8(int x) = lib.Foo.foo<T>; // Error. Not allowed by parser.
+//                                        ^
+//
+// pkg/front_end/testcases/general/issue41842.dart:20:37: Error: 'T' is already declared in this scope.
+//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
+//                                     ^
+// pkg/front_end/testcases/general/issue41842.dart:18:40: Context: Previous declaration of 'T'.
+//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
+//                                        ^
+//
+// pkg/front_end/testcases/general/issue41842.dart:20:38: Error: '>' is already declared in this scope.
+//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
+//                                      ^
+// pkg/front_end/testcases/general/issue41842.dart:18:41: Context: Previous declaration of '>'.
+//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
+//                                         ^
+//
+// pkg/front_end/testcases/general/issue41842.dart:21:37: Error: 'T' is already declared in this scope.
+//   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
+//                                     ^
+// pkg/front_end/testcases/general/issue41842.dart:20:37: Context: Previous declaration of 'T'.
+//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
+//                                     ^
+//
 // pkg/front_end/testcases/general/issue41842.dart:21:38: Error: '>' is already declared in this scope.
 //   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
 //                                      ^
diff --git a/pkg/front_end/testcases/general/issue41842.dart.strong.modular.expect b/pkg/front_end/testcases/general/issue41842.dart.strong.modular.expect
index 253d144..2b09263 100644
--- a/pkg/front_end/testcases/general/issue41842.dart.strong.modular.expect
+++ b/pkg/front_end/testcases/general/issue41842.dart.strong.modular.expect
@@ -50,13 +50,6 @@
 //   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
 //                                        ^
 //
-// pkg/front_end/testcases/general/issue41842.dart:18:40: Error: 'T' is already declared in this scope.
-//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
-//                                        ^
-// pkg/front_end/testcases/general/issue41842.dart:16:39: Context: Previous declaration of 'T'.
-//   factory A.foo8(int x) = lib.Foo.foo<T>; // Error. Not allowed by parser.
-//                                       ^
-//
 // pkg/front_end/testcases/general/issue41842.dart:18:41: Error: Operator declarations must be preceded by the keyword 'operator'.
 // Try adding the keyword 'operator'.
 //   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
@@ -71,13 +64,6 @@
 //   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
 //                                         ^
 //
-// pkg/front_end/testcases/general/issue41842.dart:18:41: Error: '>' is already declared in this scope.
-//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
-//                                         ^
-// pkg/front_end/testcases/general/issue41842.dart:16:40: Context: Previous declaration of '>'.
-//   factory A.foo8(int x) = lib.Foo.foo<T>; // Error. Not allowed by parser.
-//                                        ^
-//
 // pkg/front_end/testcases/general/issue41842.dart:20:33: Error: Expected ';' after this.
 //   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
 //                                 ^^^
@@ -95,13 +81,6 @@
 //   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
 //                                     ^
 //
-// pkg/front_end/testcases/general/issue41842.dart:20:37: Error: 'T' is already declared in this scope.
-//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
-//                                     ^
-// pkg/front_end/testcases/general/issue41842.dart:18:40: Context: Previous declaration of 'T'.
-//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
-//                                        ^
-//
 // pkg/front_end/testcases/general/issue41842.dart:20:38: Error: Operator declarations must be preceded by the keyword 'operator'.
 // Try adding the keyword 'operator'.
 //   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
@@ -116,13 +95,6 @@
 //   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
 //                                      ^
 //
-// pkg/front_end/testcases/general/issue41842.dart:20:38: Error: '>' is already declared in this scope.
-//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
-//                                      ^
-// pkg/front_end/testcases/general/issue41842.dart:18:41: Context: Previous declaration of '>'.
-//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
-//                                         ^
-//
 // pkg/front_end/testcases/general/issue41842.dart:21:33: Error: Expected ';' after this.
 //   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
 //                                 ^^^
@@ -140,13 +112,6 @@
 //   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
 //                                     ^
 //
-// pkg/front_end/testcases/general/issue41842.dart:21:37: Error: 'T' is already declared in this scope.
-//   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
-//                                     ^
-// pkg/front_end/testcases/general/issue41842.dart:20:37: Context: Previous declaration of 'T'.
-//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
-//                                     ^
-//
 // pkg/front_end/testcases/general/issue41842.dart:21:38: Error: Operator declarations must be preceded by the keyword 'operator'.
 // Try adding the keyword 'operator'.
 //   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
@@ -161,6 +126,41 @@
 //   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
 //                                      ^
 //
+// pkg/front_end/testcases/general/issue41842.dart:18:40: Error: 'T' is already declared in this scope.
+//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
+//                                        ^
+// pkg/front_end/testcases/general/issue41842.dart:16:39: Context: Previous declaration of 'T'.
+//   factory A.foo8(int x) = lib.Foo.foo<T>; // Error. Not allowed by parser.
+//                                       ^
+//
+// pkg/front_end/testcases/general/issue41842.dart:18:41: Error: '>' is already declared in this scope.
+//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
+//                                         ^
+// pkg/front_end/testcases/general/issue41842.dart:16:40: Context: Previous declaration of '>'.
+//   factory A.foo8(int x) = lib.Foo.foo<T>; // Error. Not allowed by parser.
+//                                        ^
+//
+// pkg/front_end/testcases/general/issue41842.dart:20:37: Error: 'T' is already declared in this scope.
+//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
+//                                     ^
+// pkg/front_end/testcases/general/issue41842.dart:18:40: Context: Previous declaration of 'T'.
+//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
+//                                        ^
+//
+// pkg/front_end/testcases/general/issue41842.dart:20:38: Error: '>' is already declared in this scope.
+//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
+//                                      ^
+// pkg/front_end/testcases/general/issue41842.dart:18:41: Context: Previous declaration of '>'.
+//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
+//                                         ^
+//
+// pkg/front_end/testcases/general/issue41842.dart:21:37: Error: 'T' is already declared in this scope.
+//   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
+//                                     ^
+// pkg/front_end/testcases/general/issue41842.dart:20:37: Context: Previous declaration of 'T'.
+//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
+//                                     ^
+//
 // pkg/front_end/testcases/general/issue41842.dart:21:38: Error: '>' is already declared in this scope.
 //   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
 //                                      ^
diff --git a/pkg/front_end/testcases/general/issue41842.dart.strong.outline.expect b/pkg/front_end/testcases/general/issue41842.dart.strong.outline.expect
index 88163f2..46f00ed 100644
--- a/pkg/front_end/testcases/general/issue41842.dart.strong.outline.expect
+++ b/pkg/front_end/testcases/general/issue41842.dart.strong.outline.expect
@@ -50,13 +50,6 @@
 //   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
 //                                        ^
 //
-// pkg/front_end/testcases/general/issue41842.dart:18:40: Error: 'T' is already declared in this scope.
-//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
-//                                        ^
-// pkg/front_end/testcases/general/issue41842.dart:16:39: Context: Previous declaration of 'T'.
-//   factory A.foo8(int x) = lib.Foo.foo<T>; // Error. Not allowed by parser.
-//                                       ^
-//
 // pkg/front_end/testcases/general/issue41842.dart:18:41: Error: Operator declarations must be preceded by the keyword 'operator'.
 // Try adding the keyword 'operator'.
 //   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
@@ -71,13 +64,6 @@
 //   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
 //                                         ^
 //
-// pkg/front_end/testcases/general/issue41842.dart:18:41: Error: '>' is already declared in this scope.
-//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
-//                                         ^
-// pkg/front_end/testcases/general/issue41842.dart:16:40: Context: Previous declaration of '>'.
-//   factory A.foo8(int x) = lib.Foo.foo<T>; // Error. Not allowed by parser.
-//                                        ^
-//
 // pkg/front_end/testcases/general/issue41842.dart:20:33: Error: Expected ';' after this.
 //   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
 //                                 ^^^
@@ -95,13 +81,6 @@
 //   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
 //                                     ^
 //
-// pkg/front_end/testcases/general/issue41842.dart:20:37: Error: 'T' is already declared in this scope.
-//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
-//                                     ^
-// pkg/front_end/testcases/general/issue41842.dart:18:40: Context: Previous declaration of 'T'.
-//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
-//                                        ^
-//
 // pkg/front_end/testcases/general/issue41842.dart:20:38: Error: Operator declarations must be preceded by the keyword 'operator'.
 // Try adding the keyword 'operator'.
 //   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
@@ -116,13 +95,6 @@
 //   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
 //                                      ^
 //
-// pkg/front_end/testcases/general/issue41842.dart:20:38: Error: '>' is already declared in this scope.
-//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
-//                                      ^
-// pkg/front_end/testcases/general/issue41842.dart:18:41: Context: Previous declaration of '>'.
-//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
-//                                         ^
-//
 // pkg/front_end/testcases/general/issue41842.dart:21:33: Error: Expected ';' after this.
 //   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
 //                                 ^^^
@@ -140,13 +112,6 @@
 //   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
 //                                     ^
 //
-// pkg/front_end/testcases/general/issue41842.dart:21:37: Error: 'T' is already declared in this scope.
-//   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
-//                                     ^
-// pkg/front_end/testcases/general/issue41842.dart:20:37: Context: Previous declaration of 'T'.
-//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
-//                                     ^
-//
 // pkg/front_end/testcases/general/issue41842.dart:21:38: Error: Operator declarations must be preceded by the keyword 'operator'.
 // Try adding the keyword 'operator'.
 //   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
@@ -161,6 +126,41 @@
 //   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
 //                                      ^
 //
+// pkg/front_end/testcases/general/issue41842.dart:18:40: Error: 'T' is already declared in this scope.
+//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
+//                                        ^
+// pkg/front_end/testcases/general/issue41842.dart:16:39: Context: Previous declaration of 'T'.
+//   factory A.foo8(int x) = lib.Foo.foo<T>; // Error. Not allowed by parser.
+//                                       ^
+//
+// pkg/front_end/testcases/general/issue41842.dart:18:41: Error: '>' is already declared in this scope.
+//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
+//                                         ^
+// pkg/front_end/testcases/general/issue41842.dart:16:40: Context: Previous declaration of '>'.
+//   factory A.foo8(int x) = lib.Foo.foo<T>; // Error. Not allowed by parser.
+//                                        ^
+//
+// pkg/front_end/testcases/general/issue41842.dart:20:37: Error: 'T' is already declared in this scope.
+//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
+//                                     ^
+// pkg/front_end/testcases/general/issue41842.dart:18:40: Context: Previous declaration of 'T'.
+//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
+//                                        ^
+//
+// pkg/front_end/testcases/general/issue41842.dart:20:38: Error: '>' is already declared in this scope.
+//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
+//                                      ^
+// pkg/front_end/testcases/general/issue41842.dart:18:41: Context: Previous declaration of '>'.
+//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
+//                                         ^
+//
+// pkg/front_end/testcases/general/issue41842.dart:21:37: Error: 'T' is already declared in this scope.
+//   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
+//                                     ^
+// pkg/front_end/testcases/general/issue41842.dart:20:37: Context: Previous declaration of 'T'.
+//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
+//                                     ^
+//
 // pkg/front_end/testcases/general/issue41842.dart:21:38: Error: '>' is already declared in this scope.
 //   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
 //                                      ^
diff --git a/pkg/front_end/testcases/general/issue41842.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue41842.dart.strong.transformed.expect
index 253d144..2b09263 100644
--- a/pkg/front_end/testcases/general/issue41842.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/issue41842.dart.strong.transformed.expect
@@ -50,13 +50,6 @@
 //   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
 //                                        ^
 //
-// pkg/front_end/testcases/general/issue41842.dart:18:40: Error: 'T' is already declared in this scope.
-//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
-//                                        ^
-// pkg/front_end/testcases/general/issue41842.dart:16:39: Context: Previous declaration of 'T'.
-//   factory A.foo8(int x) = lib.Foo.foo<T>; // Error. Not allowed by parser.
-//                                       ^
-//
 // pkg/front_end/testcases/general/issue41842.dart:18:41: Error: Operator declarations must be preceded by the keyword 'operator'.
 // Try adding the keyword 'operator'.
 //   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
@@ -71,13 +64,6 @@
 //   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
 //                                         ^
 //
-// pkg/front_end/testcases/general/issue41842.dart:18:41: Error: '>' is already declared in this scope.
-//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
-//                                         ^
-// pkg/front_end/testcases/general/issue41842.dart:16:40: Context: Previous declaration of '>'.
-//   factory A.foo8(int x) = lib.Foo.foo<T>; // Error. Not allowed by parser.
-//                                        ^
-//
 // pkg/front_end/testcases/general/issue41842.dart:20:33: Error: Expected ';' after this.
 //   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
 //                                 ^^^
@@ -95,13 +81,6 @@
 //   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
 //                                     ^
 //
-// pkg/front_end/testcases/general/issue41842.dart:20:37: Error: 'T' is already declared in this scope.
-//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
-//                                     ^
-// pkg/front_end/testcases/general/issue41842.dart:18:40: Context: Previous declaration of 'T'.
-//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
-//                                        ^
-//
 // pkg/front_end/testcases/general/issue41842.dart:20:38: Error: Operator declarations must be preceded by the keyword 'operator'.
 // Try adding the keyword 'operator'.
 //   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
@@ -116,13 +95,6 @@
 //   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
 //                                      ^
 //
-// pkg/front_end/testcases/general/issue41842.dart:20:38: Error: '>' is already declared in this scope.
-//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
-//                                      ^
-// pkg/front_end/testcases/general/issue41842.dart:18:41: Context: Previous declaration of '>'.
-//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
-//                                         ^
-//
 // pkg/front_end/testcases/general/issue41842.dart:21:33: Error: Expected ';' after this.
 //   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
 //                                 ^^^
@@ -140,13 +112,6 @@
 //   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
 //                                     ^
 //
-// pkg/front_end/testcases/general/issue41842.dart:21:37: Error: 'T' is already declared in this scope.
-//   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
-//                                     ^
-// pkg/front_end/testcases/general/issue41842.dart:20:37: Context: Previous declaration of 'T'.
-//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
-//                                     ^
-//
 // pkg/front_end/testcases/general/issue41842.dart:21:38: Error: Operator declarations must be preceded by the keyword 'operator'.
 // Try adding the keyword 'operator'.
 //   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
@@ -161,6 +126,41 @@
 //   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
 //                                      ^
 //
+// pkg/front_end/testcases/general/issue41842.dart:18:40: Error: 'T' is already declared in this scope.
+//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
+//                                        ^
+// pkg/front_end/testcases/general/issue41842.dart:16:39: Context: Previous declaration of 'T'.
+//   factory A.foo8(int x) = lib.Foo.foo<T>; // Error. Not allowed by parser.
+//                                       ^
+//
+// pkg/front_end/testcases/general/issue41842.dart:18:41: Error: '>' is already declared in this scope.
+//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
+//                                         ^
+// pkg/front_end/testcases/general/issue41842.dart:16:40: Context: Previous declaration of '>'.
+//   factory A.foo8(int x) = lib.Foo.foo<T>; // Error. Not allowed by parser.
+//                                        ^
+//
+// pkg/front_end/testcases/general/issue41842.dart:20:37: Error: 'T' is already declared in this scope.
+//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
+//                                     ^
+// pkg/front_end/testcases/general/issue41842.dart:18:40: Context: Previous declaration of 'T'.
+//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
+//                                        ^
+//
+// pkg/front_end/testcases/general/issue41842.dart:20:38: Error: '>' is already declared in this scope.
+//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
+//                                      ^
+// pkg/front_end/testcases/general/issue41842.dart:18:41: Context: Previous declaration of '>'.
+//   factory A.foo10(int x) = lib.Foo.bar<T>; // Error. Not allowed by parser.
+//                                         ^
+//
+// pkg/front_end/testcases/general/issue41842.dart:21:37: Error: 'T' is already declared in this scope.
+//   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
+//                                     ^
+// pkg/front_end/testcases/general/issue41842.dart:20:37: Context: Previous declaration of 'T'.
+//   factory A.foo12(int x) = B<T>.foo<T>; // Error. Not allowed by parser.
+//                                     ^
+//
 // pkg/front_end/testcases/general/issue41842.dart:21:38: Error: '>' is already declared in this scope.
 //   factory A.foo13(int x) = B<T>.bar<T>; // Error. Not allowed by parser.
 //                                      ^
diff --git a/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.expect b/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.expect
index 8323460..6767d6b 100644
--- a/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.expect
@@ -2,27 +2,6 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:9:7: Error: 'instanceMethod' is already declared in this scope.
-//   int instanceMethod() => 2;
-//       ^^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:8:7: Context: Previous declaration of 'instanceMethod'.
-//   int instanceMethod() => 1;
-//       ^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:12:11: Error: 'instanceGetter' is already declared in this scope.
-//   int get instanceGetter => 2;
-//           ^^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:11:11: Context: Previous declaration of 'instanceGetter'.
-//   int get instanceGetter => 1;
-//           ^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:18:12: Error: 'instanceSetter' is already declared in this scope.
-//   void set instanceSetter(value) {
-//            ^^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:14:12: Context: Previous declaration of 'instanceSetter'.
-//   void set instanceSetter(value) {
-//            ^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:22:7: Error: Extensions can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   int instanceField = 1;
@@ -33,13 +12,6 @@
 //   int instanceField = 2;
 //       ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:23:7: Error: 'instanceField' is already declared in this scope.
-//   int instanceField = 2;
-//       ^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:22:7: Context: Previous declaration of 'instanceField'.
-//   int instanceField = 1;
-//       ^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:25:7: Error: Extensions can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   int instanceFieldAndSetter1 = 1;
@@ -70,25 +42,11 @@
 //   final int instanceDuplicateFieldAndSetter = 2;
 //             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:46:13: Error: 'instanceDuplicateFieldAndSetter' is already declared in this scope.
-//   final int instanceDuplicateFieldAndSetter = 2;
-//             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:45:13: Context: Previous declaration of 'instanceDuplicateFieldAndSetter'.
-//   final int instanceDuplicateFieldAndSetter = 1;
-//             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:51:13: Error: Extensions can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   final int instanceFieldAndDuplicateSetter = 1;
 //             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:56:12: Error: 'instanceFieldAndDuplicateSetter' is already declared in this scope.
-//   void set instanceFieldAndDuplicateSetter(int value) {
-//            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:52:12: Context: Previous declaration of 'instanceFieldAndDuplicateSetter'.
-//   void set instanceFieldAndDuplicateSetter(int value) {
-//            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:60:13: Error: Extensions can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   final int instanceDuplicateFieldAndDuplicateSetter = 1;
@@ -99,6 +57,48 @@
 //   final int instanceDuplicateFieldAndDuplicateSetter = 2;
 //             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:9:7: Error: 'instanceMethod' is already declared in this scope.
+//   int instanceMethod() => 2;
+//       ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:8:7: Context: Previous declaration of 'instanceMethod'.
+//   int instanceMethod() => 1;
+//       ^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:12:11: Error: 'instanceGetter' is already declared in this scope.
+//   int get instanceGetter => 2;
+//           ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:11:11: Context: Previous declaration of 'instanceGetter'.
+//   int get instanceGetter => 1;
+//           ^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:18:12: Error: 'instanceSetter' is already declared in this scope.
+//   void set instanceSetter(value) {
+//            ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:14:12: Context: Previous declaration of 'instanceSetter'.
+//   void set instanceSetter(value) {
+//            ^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:23:7: Error: 'instanceField' is already declared in this scope.
+//   int instanceField = 2;
+//       ^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:22:7: Context: Previous declaration of 'instanceField'.
+//   int instanceField = 1;
+//       ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:46:13: Error: 'instanceDuplicateFieldAndSetter' is already declared in this scope.
+//   final int instanceDuplicateFieldAndSetter = 2;
+//             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:45:13: Context: Previous declaration of 'instanceDuplicateFieldAndSetter'.
+//   final int instanceDuplicateFieldAndSetter = 1;
+//             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:56:12: Error: 'instanceFieldAndDuplicateSetter' is already declared in this scope.
+//   void set instanceFieldAndDuplicateSetter(int value) {
+//            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:52:12: Context: Previous declaration of 'instanceFieldAndDuplicateSetter'.
+//   void set instanceFieldAndDuplicateSetter(int value) {
+//            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
 // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:61:13: Error: 'instanceDuplicateFieldAndDuplicateSetter' is already declared in this scope.
 //   final int instanceDuplicateFieldAndDuplicateSetter = 2;
 //             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.modular.expect
index 8323460..6767d6b 100644
--- a/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.modular.expect
+++ b/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.modular.expect
@@ -2,27 +2,6 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:9:7: Error: 'instanceMethod' is already declared in this scope.
-//   int instanceMethod() => 2;
-//       ^^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:8:7: Context: Previous declaration of 'instanceMethod'.
-//   int instanceMethod() => 1;
-//       ^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:12:11: Error: 'instanceGetter' is already declared in this scope.
-//   int get instanceGetter => 2;
-//           ^^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:11:11: Context: Previous declaration of 'instanceGetter'.
-//   int get instanceGetter => 1;
-//           ^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:18:12: Error: 'instanceSetter' is already declared in this scope.
-//   void set instanceSetter(value) {
-//            ^^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:14:12: Context: Previous declaration of 'instanceSetter'.
-//   void set instanceSetter(value) {
-//            ^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:22:7: Error: Extensions can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   int instanceField = 1;
@@ -33,13 +12,6 @@
 //   int instanceField = 2;
 //       ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:23:7: Error: 'instanceField' is already declared in this scope.
-//   int instanceField = 2;
-//       ^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:22:7: Context: Previous declaration of 'instanceField'.
-//   int instanceField = 1;
-//       ^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:25:7: Error: Extensions can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   int instanceFieldAndSetter1 = 1;
@@ -70,25 +42,11 @@
 //   final int instanceDuplicateFieldAndSetter = 2;
 //             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:46:13: Error: 'instanceDuplicateFieldAndSetter' is already declared in this scope.
-//   final int instanceDuplicateFieldAndSetter = 2;
-//             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:45:13: Context: Previous declaration of 'instanceDuplicateFieldAndSetter'.
-//   final int instanceDuplicateFieldAndSetter = 1;
-//             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:51:13: Error: Extensions can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   final int instanceFieldAndDuplicateSetter = 1;
 //             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:56:12: Error: 'instanceFieldAndDuplicateSetter' is already declared in this scope.
-//   void set instanceFieldAndDuplicateSetter(int value) {
-//            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:52:12: Context: Previous declaration of 'instanceFieldAndDuplicateSetter'.
-//   void set instanceFieldAndDuplicateSetter(int value) {
-//            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:60:13: Error: Extensions can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   final int instanceDuplicateFieldAndDuplicateSetter = 1;
@@ -99,6 +57,48 @@
 //   final int instanceDuplicateFieldAndDuplicateSetter = 2;
 //             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:9:7: Error: 'instanceMethod' is already declared in this scope.
+//   int instanceMethod() => 2;
+//       ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:8:7: Context: Previous declaration of 'instanceMethod'.
+//   int instanceMethod() => 1;
+//       ^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:12:11: Error: 'instanceGetter' is already declared in this scope.
+//   int get instanceGetter => 2;
+//           ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:11:11: Context: Previous declaration of 'instanceGetter'.
+//   int get instanceGetter => 1;
+//           ^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:18:12: Error: 'instanceSetter' is already declared in this scope.
+//   void set instanceSetter(value) {
+//            ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:14:12: Context: Previous declaration of 'instanceSetter'.
+//   void set instanceSetter(value) {
+//            ^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:23:7: Error: 'instanceField' is already declared in this scope.
+//   int instanceField = 2;
+//       ^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:22:7: Context: Previous declaration of 'instanceField'.
+//   int instanceField = 1;
+//       ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:46:13: Error: 'instanceDuplicateFieldAndSetter' is already declared in this scope.
+//   final int instanceDuplicateFieldAndSetter = 2;
+//             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:45:13: Context: Previous declaration of 'instanceDuplicateFieldAndSetter'.
+//   final int instanceDuplicateFieldAndSetter = 1;
+//             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:56:12: Error: 'instanceFieldAndDuplicateSetter' is already declared in this scope.
+//   void set instanceFieldAndDuplicateSetter(int value) {
+//            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:52:12: Context: Previous declaration of 'instanceFieldAndDuplicateSetter'.
+//   void set instanceFieldAndDuplicateSetter(int value) {
+//            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
 // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:61:13: Error: 'instanceDuplicateFieldAndDuplicateSetter' is already declared in this scope.
 //   final int instanceDuplicateFieldAndDuplicateSetter = 2;
 //             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.outline.expect b/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.outline.expect
index f89d18a..a7db4b3 100644
--- a/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.outline.expect
+++ b/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.outline.expect
@@ -2,27 +2,6 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:9:7: Error: 'instanceMethod' is already declared in this scope.
-//   int instanceMethod() => 2;
-//       ^^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:8:7: Context: Previous declaration of 'instanceMethod'.
-//   int instanceMethod() => 1;
-//       ^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:12:11: Error: 'instanceGetter' is already declared in this scope.
-//   int get instanceGetter => 2;
-//           ^^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:11:11: Context: Previous declaration of 'instanceGetter'.
-//   int get instanceGetter => 1;
-//           ^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:18:12: Error: 'instanceSetter' is already declared in this scope.
-//   void set instanceSetter(value) {
-//            ^^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:14:12: Context: Previous declaration of 'instanceSetter'.
-//   void set instanceSetter(value) {
-//            ^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:22:7: Error: Extensions can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   int instanceField = 1;
@@ -33,13 +12,6 @@
 //   int instanceField = 2;
 //       ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:23:7: Error: 'instanceField' is already declared in this scope.
-//   int instanceField = 2;
-//       ^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:22:7: Context: Previous declaration of 'instanceField'.
-//   int instanceField = 1;
-//       ^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:25:7: Error: Extensions can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   int instanceFieldAndSetter1 = 1;
@@ -70,25 +42,11 @@
 //   final int instanceDuplicateFieldAndSetter = 2;
 //             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:46:13: Error: 'instanceDuplicateFieldAndSetter' is already declared in this scope.
-//   final int instanceDuplicateFieldAndSetter = 2;
-//             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:45:13: Context: Previous declaration of 'instanceDuplicateFieldAndSetter'.
-//   final int instanceDuplicateFieldAndSetter = 1;
-//             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:51:13: Error: Extensions can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   final int instanceFieldAndDuplicateSetter = 1;
 //             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:56:12: Error: 'instanceFieldAndDuplicateSetter' is already declared in this scope.
-//   void set instanceFieldAndDuplicateSetter(int value) {
-//            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:52:12: Context: Previous declaration of 'instanceFieldAndDuplicateSetter'.
-//   void set instanceFieldAndDuplicateSetter(int value) {
-//            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:60:13: Error: Extensions can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   final int instanceDuplicateFieldAndDuplicateSetter = 1;
@@ -99,6 +57,48 @@
 //   final int instanceDuplicateFieldAndDuplicateSetter = 2;
 //             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:9:7: Error: 'instanceMethod' is already declared in this scope.
+//   int instanceMethod() => 2;
+//       ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:8:7: Context: Previous declaration of 'instanceMethod'.
+//   int instanceMethod() => 1;
+//       ^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:12:11: Error: 'instanceGetter' is already declared in this scope.
+//   int get instanceGetter => 2;
+//           ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:11:11: Context: Previous declaration of 'instanceGetter'.
+//   int get instanceGetter => 1;
+//           ^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:18:12: Error: 'instanceSetter' is already declared in this scope.
+//   void set instanceSetter(value) {
+//            ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:14:12: Context: Previous declaration of 'instanceSetter'.
+//   void set instanceSetter(value) {
+//            ^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:23:7: Error: 'instanceField' is already declared in this scope.
+//   int instanceField = 2;
+//       ^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:22:7: Context: Previous declaration of 'instanceField'.
+//   int instanceField = 1;
+//       ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:46:13: Error: 'instanceDuplicateFieldAndSetter' is already declared in this scope.
+//   final int instanceDuplicateFieldAndSetter = 2;
+//             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:45:13: Context: Previous declaration of 'instanceDuplicateFieldAndSetter'.
+//   final int instanceDuplicateFieldAndSetter = 1;
+//             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:56:12: Error: 'instanceFieldAndDuplicateSetter' is already declared in this scope.
+//   void set instanceFieldAndDuplicateSetter(int value) {
+//            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:52:12: Context: Previous declaration of 'instanceFieldAndDuplicateSetter'.
+//   void set instanceFieldAndDuplicateSetter(int value) {
+//            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
 // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:61:13: Error: 'instanceDuplicateFieldAndDuplicateSetter' is already declared in this scope.
 //   final int instanceDuplicateFieldAndDuplicateSetter = 2;
 //             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.transformed.expect
index 8323460..6767d6b 100644
--- a/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart.strong.transformed.expect
@@ -2,27 +2,6 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:9:7: Error: 'instanceMethod' is already declared in this scope.
-//   int instanceMethod() => 2;
-//       ^^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:8:7: Context: Previous declaration of 'instanceMethod'.
-//   int instanceMethod() => 1;
-//       ^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:12:11: Error: 'instanceGetter' is already declared in this scope.
-//   int get instanceGetter => 2;
-//           ^^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:11:11: Context: Previous declaration of 'instanceGetter'.
-//   int get instanceGetter => 1;
-//           ^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:18:12: Error: 'instanceSetter' is already declared in this scope.
-//   void set instanceSetter(value) {
-//            ^^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:14:12: Context: Previous declaration of 'instanceSetter'.
-//   void set instanceSetter(value) {
-//            ^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:22:7: Error: Extensions can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   int instanceField = 1;
@@ -33,13 +12,6 @@
 //   int instanceField = 2;
 //       ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:23:7: Error: 'instanceField' is already declared in this scope.
-//   int instanceField = 2;
-//       ^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:22:7: Context: Previous declaration of 'instanceField'.
-//   int instanceField = 1;
-//       ^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:25:7: Error: Extensions can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   int instanceFieldAndSetter1 = 1;
@@ -70,25 +42,11 @@
 //   final int instanceDuplicateFieldAndSetter = 2;
 //             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:46:13: Error: 'instanceDuplicateFieldAndSetter' is already declared in this scope.
-//   final int instanceDuplicateFieldAndSetter = 2;
-//             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:45:13: Context: Previous declaration of 'instanceDuplicateFieldAndSetter'.
-//   final int instanceDuplicateFieldAndSetter = 1;
-//             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:51:13: Error: Extensions can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   final int instanceFieldAndDuplicateSetter = 1;
 //             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:56:12: Error: 'instanceFieldAndDuplicateSetter' is already declared in this scope.
-//   void set instanceFieldAndDuplicateSetter(int value) {
-//            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:52:12: Context: Previous declaration of 'instanceFieldAndDuplicateSetter'.
-//   void set instanceFieldAndDuplicateSetter(int value) {
-//            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:60:13: Error: Extensions can't declare instance fields
 // Try removing the field declaration or making it a static field
 //   final int instanceDuplicateFieldAndDuplicateSetter = 1;
@@ -99,6 +57,48 @@
 //   final int instanceDuplicateFieldAndDuplicateSetter = 2;
 //             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:9:7: Error: 'instanceMethod' is already declared in this scope.
+//   int instanceMethod() => 2;
+//       ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:8:7: Context: Previous declaration of 'instanceMethod'.
+//   int instanceMethod() => 1;
+//       ^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:12:11: Error: 'instanceGetter' is already declared in this scope.
+//   int get instanceGetter => 2;
+//           ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:11:11: Context: Previous declaration of 'instanceGetter'.
+//   int get instanceGetter => 1;
+//           ^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:18:12: Error: 'instanceSetter' is already declared in this scope.
+//   void set instanceSetter(value) {
+//            ^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:14:12: Context: Previous declaration of 'instanceSetter'.
+//   void set instanceSetter(value) {
+//            ^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:23:7: Error: 'instanceField' is already declared in this scope.
+//   int instanceField = 2;
+//       ^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:22:7: Context: Previous declaration of 'instanceField'.
+//   int instanceField = 1;
+//       ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:46:13: Error: 'instanceDuplicateFieldAndSetter' is already declared in this scope.
+//   final int instanceDuplicateFieldAndSetter = 2;
+//             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:45:13: Context: Previous declaration of 'instanceDuplicateFieldAndSetter'.
+//   final int instanceDuplicateFieldAndSetter = 1;
+//             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:56:12: Error: 'instanceFieldAndDuplicateSetter' is already declared in this scope.
+//   void set instanceFieldAndDuplicateSetter(int value) {
+//            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:52:12: Context: Previous declaration of 'instanceFieldAndDuplicateSetter'.
+//   void set instanceFieldAndDuplicateSetter(int value) {
+//            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
 // pkg/front_end/testcases/nnbd/duplicates_instance_extension.dart:61:13: Error: 'instanceDuplicateFieldAndDuplicateSetter' is already declared in this scope.
 //   final int instanceDuplicateFieldAndDuplicateSetter = 2;
 //             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.expect b/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.expect
index b3ad156..8a78eec 100644
--- a/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.expect
@@ -30,6 +30,66 @@
 // void set topLevelLateFinalFieldAndDuplicateSetter(int? value) {}
 //          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:104:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? extensionInstanceFieldAndSetter;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:107:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? extensionInstanceFieldAndDuplicateSetter;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:111:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? duplicateExtensionInstanceFieldAndSetter1;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:112:14: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   final int? duplicateExtensionInstanceFieldAndSetter1 = null;
+//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:115:14: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   final int? duplicateExtensionInstanceFieldAndSetter2 = null;
+//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:116:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? duplicateExtensionInstanceFieldAndSetter2;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:148:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? extensionInstanceFieldAndStaticSetter;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:151:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? extensionInstanceFieldAndStaticDuplicateSetter;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:155:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? duplicateExtensionInstanceFieldAndStaticSetter1;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:156:14: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   final int? duplicateExtensionInstanceFieldAndStaticSetter1 = null;
+//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:159:14: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   final int? duplicateExtensionInstanceFieldAndStaticSetter2 = null;
+//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? duplicateExtensionInstanceFieldAndStaticSetter2;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:33:12: Error: 'instanceFieldAndDuplicateSetter' is already declared in this scope.
 //   void set instanceFieldAndDuplicateSetter(int? value) {}
 //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -128,16 +188,6 @@
 //   static final int? duplicateStaticFieldAndInstanceSetter2 = null;
 //                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:104:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? extensionInstanceFieldAndSetter;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:107:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? extensionInstanceFieldAndDuplicateSetter;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:109:12: Error: 'extensionInstanceFieldAndDuplicateSetter' is already declared in this scope.
 //   void set extensionInstanceFieldAndDuplicateSetter(int? value) {}
 //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -145,16 +195,6 @@
 //   void set extensionInstanceFieldAndDuplicateSetter(int? value) {}
 //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:111:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? duplicateExtensionInstanceFieldAndSetter1;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:112:14: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   final int? duplicateExtensionInstanceFieldAndSetter1 = null;
-//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:112:14: Error: 'duplicateExtensionInstanceFieldAndSetter1' is already declared in this scope.
 //   final int? duplicateExtensionInstanceFieldAndSetter1 = null;
 //              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -162,16 +202,6 @@
 //   int? duplicateExtensionInstanceFieldAndSetter1;
 //        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:115:14: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   final int? duplicateExtensionInstanceFieldAndSetter2 = null;
-//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:116:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? duplicateExtensionInstanceFieldAndSetter2;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:116:8: Error: 'duplicateExtensionInstanceFieldAndSetter2' is already declared in this scope.
 //   int? duplicateExtensionInstanceFieldAndSetter2;
 //        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -214,16 +244,6 @@
 //   void set extensionStaticFieldAndInstanceDuplicateSetter(int? value) {}
 //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:148:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? extensionInstanceFieldAndStaticSetter;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:151:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? extensionInstanceFieldAndStaticDuplicateSetter;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:153:19: Error: 'extensionInstanceFieldAndStaticDuplicateSetter' is already declared in this scope.
 //   static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {}
 //                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -231,16 +251,6 @@
 //   static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {}
 //                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:155:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? duplicateExtensionInstanceFieldAndStaticSetter1;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:156:14: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   final int? duplicateExtensionInstanceFieldAndStaticSetter1 = null;
-//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:156:14: Error: 'duplicateExtensionInstanceFieldAndStaticSetter1' is already declared in this scope.
 //   final int? duplicateExtensionInstanceFieldAndStaticSetter1 = null;
 //              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -248,16 +258,6 @@
 //   int? duplicateExtensionInstanceFieldAndStaticSetter1;
 //        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:159:14: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   final int? duplicateExtensionInstanceFieldAndStaticSetter2 = null;
-//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? duplicateExtensionInstanceFieldAndStaticSetter2;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Error: 'duplicateExtensionInstanceFieldAndStaticSetter2' is already declared in this scope.
 //   int? duplicateExtensionInstanceFieldAndStaticSetter2;
 //        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.modular.expect
index b3ad156..8a78eec 100644
--- a/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.modular.expect
+++ b/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.modular.expect
@@ -30,6 +30,66 @@
 // void set topLevelLateFinalFieldAndDuplicateSetter(int? value) {}
 //          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:104:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? extensionInstanceFieldAndSetter;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:107:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? extensionInstanceFieldAndDuplicateSetter;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:111:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? duplicateExtensionInstanceFieldAndSetter1;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:112:14: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   final int? duplicateExtensionInstanceFieldAndSetter1 = null;
+//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:115:14: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   final int? duplicateExtensionInstanceFieldAndSetter2 = null;
+//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:116:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? duplicateExtensionInstanceFieldAndSetter2;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:148:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? extensionInstanceFieldAndStaticSetter;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:151:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? extensionInstanceFieldAndStaticDuplicateSetter;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:155:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? duplicateExtensionInstanceFieldAndStaticSetter1;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:156:14: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   final int? duplicateExtensionInstanceFieldAndStaticSetter1 = null;
+//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:159:14: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   final int? duplicateExtensionInstanceFieldAndStaticSetter2 = null;
+//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? duplicateExtensionInstanceFieldAndStaticSetter2;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:33:12: Error: 'instanceFieldAndDuplicateSetter' is already declared in this scope.
 //   void set instanceFieldAndDuplicateSetter(int? value) {}
 //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -128,16 +188,6 @@
 //   static final int? duplicateStaticFieldAndInstanceSetter2 = null;
 //                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:104:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? extensionInstanceFieldAndSetter;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:107:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? extensionInstanceFieldAndDuplicateSetter;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:109:12: Error: 'extensionInstanceFieldAndDuplicateSetter' is already declared in this scope.
 //   void set extensionInstanceFieldAndDuplicateSetter(int? value) {}
 //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -145,16 +195,6 @@
 //   void set extensionInstanceFieldAndDuplicateSetter(int? value) {}
 //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:111:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? duplicateExtensionInstanceFieldAndSetter1;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:112:14: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   final int? duplicateExtensionInstanceFieldAndSetter1 = null;
-//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:112:14: Error: 'duplicateExtensionInstanceFieldAndSetter1' is already declared in this scope.
 //   final int? duplicateExtensionInstanceFieldAndSetter1 = null;
 //              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -162,16 +202,6 @@
 //   int? duplicateExtensionInstanceFieldAndSetter1;
 //        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:115:14: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   final int? duplicateExtensionInstanceFieldAndSetter2 = null;
-//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:116:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? duplicateExtensionInstanceFieldAndSetter2;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:116:8: Error: 'duplicateExtensionInstanceFieldAndSetter2' is already declared in this scope.
 //   int? duplicateExtensionInstanceFieldAndSetter2;
 //        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -214,16 +244,6 @@
 //   void set extensionStaticFieldAndInstanceDuplicateSetter(int? value) {}
 //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:148:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? extensionInstanceFieldAndStaticSetter;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:151:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? extensionInstanceFieldAndStaticDuplicateSetter;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:153:19: Error: 'extensionInstanceFieldAndStaticDuplicateSetter' is already declared in this scope.
 //   static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {}
 //                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -231,16 +251,6 @@
 //   static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {}
 //                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:155:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? duplicateExtensionInstanceFieldAndStaticSetter1;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:156:14: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   final int? duplicateExtensionInstanceFieldAndStaticSetter1 = null;
-//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:156:14: Error: 'duplicateExtensionInstanceFieldAndStaticSetter1' is already declared in this scope.
 //   final int? duplicateExtensionInstanceFieldAndStaticSetter1 = null;
 //              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -248,16 +258,6 @@
 //   int? duplicateExtensionInstanceFieldAndStaticSetter1;
 //        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:159:14: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   final int? duplicateExtensionInstanceFieldAndStaticSetter2 = null;
-//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? duplicateExtensionInstanceFieldAndStaticSetter2;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Error: 'duplicateExtensionInstanceFieldAndStaticSetter2' is already declared in this scope.
 //   int? duplicateExtensionInstanceFieldAndStaticSetter2;
 //        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.outline.expect b/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.outline.expect
index 3847188..70557c6 100644
--- a/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.outline.expect
+++ b/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.outline.expect
@@ -30,6 +30,66 @@
 // void set topLevelLateFinalFieldAndDuplicateSetter(int? value) {}
 //          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:104:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? extensionInstanceFieldAndSetter;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:107:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? extensionInstanceFieldAndDuplicateSetter;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:111:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? duplicateExtensionInstanceFieldAndSetter1;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:112:14: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   final int? duplicateExtensionInstanceFieldAndSetter1 = null;
+//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:115:14: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   final int? duplicateExtensionInstanceFieldAndSetter2 = null;
+//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:116:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? duplicateExtensionInstanceFieldAndSetter2;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:148:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? extensionInstanceFieldAndStaticSetter;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:151:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? extensionInstanceFieldAndStaticDuplicateSetter;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:155:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? duplicateExtensionInstanceFieldAndStaticSetter1;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:156:14: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   final int? duplicateExtensionInstanceFieldAndStaticSetter1 = null;
+//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:159:14: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   final int? duplicateExtensionInstanceFieldAndStaticSetter2 = null;
+//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? duplicateExtensionInstanceFieldAndStaticSetter2;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:33:12: Error: 'instanceFieldAndDuplicateSetter' is already declared in this scope.
 //   void set instanceFieldAndDuplicateSetter(int? value) {}
 //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -128,16 +188,6 @@
 //   static final int? duplicateStaticFieldAndInstanceSetter2 = null;
 //                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:104:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? extensionInstanceFieldAndSetter;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:107:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? extensionInstanceFieldAndDuplicateSetter;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:109:12: Error: 'extensionInstanceFieldAndDuplicateSetter' is already declared in this scope.
 //   void set extensionInstanceFieldAndDuplicateSetter(int? value) {}
 //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -145,16 +195,6 @@
 //   void set extensionInstanceFieldAndDuplicateSetter(int? value) {}
 //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:111:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? duplicateExtensionInstanceFieldAndSetter1;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:112:14: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   final int? duplicateExtensionInstanceFieldAndSetter1 = null;
-//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:112:14: Error: 'duplicateExtensionInstanceFieldAndSetter1' is already declared in this scope.
 //   final int? duplicateExtensionInstanceFieldAndSetter1 = null;
 //              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -162,16 +202,6 @@
 //   int? duplicateExtensionInstanceFieldAndSetter1;
 //        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:115:14: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   final int? duplicateExtensionInstanceFieldAndSetter2 = null;
-//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:116:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? duplicateExtensionInstanceFieldAndSetter2;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:116:8: Error: 'duplicateExtensionInstanceFieldAndSetter2' is already declared in this scope.
 //   int? duplicateExtensionInstanceFieldAndSetter2;
 //        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -214,16 +244,6 @@
 //   void set extensionStaticFieldAndInstanceDuplicateSetter(int? value) {}
 //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:148:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? extensionInstanceFieldAndStaticSetter;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:151:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? extensionInstanceFieldAndStaticDuplicateSetter;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:153:19: Error: 'extensionInstanceFieldAndStaticDuplicateSetter' is already declared in this scope.
 //   static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {}
 //                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -231,16 +251,6 @@
 //   static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {}
 //                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:155:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? duplicateExtensionInstanceFieldAndStaticSetter1;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:156:14: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   final int? duplicateExtensionInstanceFieldAndStaticSetter1 = null;
-//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:156:14: Error: 'duplicateExtensionInstanceFieldAndStaticSetter1' is already declared in this scope.
 //   final int? duplicateExtensionInstanceFieldAndStaticSetter1 = null;
 //              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -248,16 +258,6 @@
 //   int? duplicateExtensionInstanceFieldAndStaticSetter1;
 //        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:159:14: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   final int? duplicateExtensionInstanceFieldAndStaticSetter2 = null;
-//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? duplicateExtensionInstanceFieldAndStaticSetter2;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Error: 'duplicateExtensionInstanceFieldAndStaticSetter2' is already declared in this scope.
 //   int? duplicateExtensionInstanceFieldAndStaticSetter2;
 //        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.transformed.expect
index b3ad156..8a78eec 100644
--- a/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/field_vs_setter.dart.strong.transformed.expect
@@ -30,6 +30,66 @@
 // void set topLevelLateFinalFieldAndDuplicateSetter(int? value) {}
 //          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:104:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? extensionInstanceFieldAndSetter;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:107:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? extensionInstanceFieldAndDuplicateSetter;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:111:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? duplicateExtensionInstanceFieldAndSetter1;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:112:14: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   final int? duplicateExtensionInstanceFieldAndSetter1 = null;
+//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:115:14: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   final int? duplicateExtensionInstanceFieldAndSetter2 = null;
+//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:116:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? duplicateExtensionInstanceFieldAndSetter2;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:148:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? extensionInstanceFieldAndStaticSetter;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:151:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? extensionInstanceFieldAndStaticDuplicateSetter;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:155:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? duplicateExtensionInstanceFieldAndStaticSetter1;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:156:14: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   final int? duplicateExtensionInstanceFieldAndStaticSetter1 = null;
+//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:159:14: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   final int? duplicateExtensionInstanceFieldAndStaticSetter2 = null;
+//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Error: Extensions can't declare instance fields
+// Try removing the field declaration or making it a static field
+//   int? duplicateExtensionInstanceFieldAndStaticSetter2;
+//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:33:12: Error: 'instanceFieldAndDuplicateSetter' is already declared in this scope.
 //   void set instanceFieldAndDuplicateSetter(int? value) {}
 //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -128,16 +188,6 @@
 //   static final int? duplicateStaticFieldAndInstanceSetter2 = null;
 //                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:104:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? extensionInstanceFieldAndSetter;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:107:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? extensionInstanceFieldAndDuplicateSetter;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:109:12: Error: 'extensionInstanceFieldAndDuplicateSetter' is already declared in this scope.
 //   void set extensionInstanceFieldAndDuplicateSetter(int? value) {}
 //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -145,16 +195,6 @@
 //   void set extensionInstanceFieldAndDuplicateSetter(int? value) {}
 //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:111:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? duplicateExtensionInstanceFieldAndSetter1;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:112:14: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   final int? duplicateExtensionInstanceFieldAndSetter1 = null;
-//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:112:14: Error: 'duplicateExtensionInstanceFieldAndSetter1' is already declared in this scope.
 //   final int? duplicateExtensionInstanceFieldAndSetter1 = null;
 //              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -162,16 +202,6 @@
 //   int? duplicateExtensionInstanceFieldAndSetter1;
 //        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:115:14: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   final int? duplicateExtensionInstanceFieldAndSetter2 = null;
-//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:116:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? duplicateExtensionInstanceFieldAndSetter2;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:116:8: Error: 'duplicateExtensionInstanceFieldAndSetter2' is already declared in this scope.
 //   int? duplicateExtensionInstanceFieldAndSetter2;
 //        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -214,16 +244,6 @@
 //   void set extensionStaticFieldAndInstanceDuplicateSetter(int? value) {}
 //            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:148:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? extensionInstanceFieldAndStaticSetter;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:151:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? extensionInstanceFieldAndStaticDuplicateSetter;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:153:19: Error: 'extensionInstanceFieldAndStaticDuplicateSetter' is already declared in this scope.
 //   static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {}
 //                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -231,16 +251,6 @@
 //   static void set extensionInstanceFieldAndStaticDuplicateSetter(int? value) {}
 //                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:155:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? duplicateExtensionInstanceFieldAndStaticSetter1;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:156:14: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   final int? duplicateExtensionInstanceFieldAndStaticSetter1 = null;
-//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:156:14: Error: 'duplicateExtensionInstanceFieldAndStaticSetter1' is already declared in this scope.
 //   final int? duplicateExtensionInstanceFieldAndStaticSetter1 = null;
 //              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -248,16 +258,6 @@
 //   int? duplicateExtensionInstanceFieldAndStaticSetter1;
 //        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:159:14: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   final int? duplicateExtensionInstanceFieldAndStaticSetter2 = null;
-//              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Error: Extensions can't declare instance fields
-// Try removing the field declaration or making it a static field
-//   int? duplicateExtensionInstanceFieldAndStaticSetter2;
-//        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
 // pkg/front_end/testcases/nnbd/field_vs_setter.dart:160:8: Error: 'duplicateExtensionInstanceFieldAndStaticSetter2' is already declared in this scope.
 //   int? duplicateExtensionInstanceFieldAndStaticSetter2;
 //        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.expect b/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.expect
index 7095266..c12d5e6 100644
--- a/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.expect
@@ -2,6 +2,11 @@
 //
 // Problems in library:
 //
+// pkg/front_end/testcases/nnbd/instance_duplicates.dart:54:3: Error: The return type of the setter must be 'void' or absent.
+// Try removing the return type, or define a method rather than a setter.
+//   int? set methodAndSetter2() {}
+//   ^
+//
 // pkg/front_end/testcases/nnbd/instance_duplicates.dart:7:8: Error: 'methodAndField1' is already declared in this scope.
 //   int? methodAndField1;
 //        ^^^^^^^^^^^^^^^
@@ -86,11 +91,6 @@
 //   final int? methodAndFinalFieldAndSetter4 = 0;
 //              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/instance_duplicates.dart:54:3: Error: The return type of the setter must be 'void' or absent.
-// Try removing the return type, or define a method rather than a setter.
-//   int? set methodAndSetter2() {}
-//   ^
-//
 // pkg/front_end/testcases/nnbd/instance_duplicates.dart:63:14: Error: 'fieldAndFinalFieldAndSetter1' is already declared in this scope.
 //   final int? fieldAndFinalFieldAndSetter1 = 0;
 //              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.modular.expect b/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.modular.expect
index 7095266..c12d5e6 100644
--- a/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.modular.expect
+++ b/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.modular.expect
@@ -2,6 +2,11 @@
 //
 // Problems in library:
 //
+// pkg/front_end/testcases/nnbd/instance_duplicates.dart:54:3: Error: The return type of the setter must be 'void' or absent.
+// Try removing the return type, or define a method rather than a setter.
+//   int? set methodAndSetter2() {}
+//   ^
+//
 // pkg/front_end/testcases/nnbd/instance_duplicates.dart:7:8: Error: 'methodAndField1' is already declared in this scope.
 //   int? methodAndField1;
 //        ^^^^^^^^^^^^^^^
@@ -86,11 +91,6 @@
 //   final int? methodAndFinalFieldAndSetter4 = 0;
 //              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/instance_duplicates.dart:54:3: Error: The return type of the setter must be 'void' or absent.
-// Try removing the return type, or define a method rather than a setter.
-//   int? set methodAndSetter2() {}
-//   ^
-//
 // pkg/front_end/testcases/nnbd/instance_duplicates.dart:63:14: Error: 'fieldAndFinalFieldAndSetter1' is already declared in this scope.
 //   final int? fieldAndFinalFieldAndSetter1 = 0;
 //              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.outline.expect b/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.outline.expect
index f9d6e08..e559d78 100644
--- a/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.outline.expect
+++ b/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.outline.expect
@@ -2,6 +2,11 @@
 //
 // Problems in library:
 //
+// pkg/front_end/testcases/nnbd/instance_duplicates.dart:54:3: Error: The return type of the setter must be 'void' or absent.
+// Try removing the return type, or define a method rather than a setter.
+//   int? set methodAndSetter2() {}
+//   ^
+//
 // pkg/front_end/testcases/nnbd/instance_duplicates.dart:7:8: Error: 'methodAndField1' is already declared in this scope.
 //   int? methodAndField1;
 //        ^^^^^^^^^^^^^^^
@@ -86,11 +91,6 @@
 //   final int? methodAndFinalFieldAndSetter4 = 0;
 //              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/instance_duplicates.dart:54:3: Error: The return type of the setter must be 'void' or absent.
-// Try removing the return type, or define a method rather than a setter.
-//   int? set methodAndSetter2() {}
-//   ^
-//
 // pkg/front_end/testcases/nnbd/instance_duplicates.dart:63:14: Error: 'fieldAndFinalFieldAndSetter1' is already declared in this scope.
 //   final int? fieldAndFinalFieldAndSetter1 = 0;
 //              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.transformed.expect
index 7095266..c12d5e6 100644
--- a/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/instance_duplicates.dart.strong.transformed.expect
@@ -2,6 +2,11 @@
 //
 // Problems in library:
 //
+// pkg/front_end/testcases/nnbd/instance_duplicates.dart:54:3: Error: The return type of the setter must be 'void' or absent.
+// Try removing the return type, or define a method rather than a setter.
+//   int? set methodAndSetter2() {}
+//   ^
+//
 // pkg/front_end/testcases/nnbd/instance_duplicates.dart:7:8: Error: 'methodAndField1' is already declared in this scope.
 //   int? methodAndField1;
 //        ^^^^^^^^^^^^^^^
@@ -86,11 +91,6 @@
 //   final int? methodAndFinalFieldAndSetter4 = 0;
 //              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/nnbd/instance_duplicates.dart:54:3: Error: The return type of the setter must be 'void' or absent.
-// Try removing the return type, or define a method rather than a setter.
-//   int? set methodAndSetter2() {}
-//   ^
-//
 // pkg/front_end/testcases/nnbd/instance_duplicates.dart:63:14: Error: 'fieldAndFinalFieldAndSetter1' is already declared in this scope.
 //   final int? fieldAndFinalFieldAndSetter1 = 0;
 //              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^