Version 3.6.0-111.0.dev

Merge 3b09a49ce58a1820ffef121910ba3de2a46f1f3a into dev
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/declaration_helper.dart b/pkg/analysis_server/lib/src/services/completion/dart/declaration_helper.dart
index 5f8215d..7394dce 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/declaration_helper.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/declaration_helper.dart
@@ -15,6 +15,7 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/ast/extensions.dart';
 import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/extensions.dart';
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/element/type_algebra.dart';
 import 'package:analyzer/src/dart/resolver/applicable_extensions.dart';
@@ -25,10 +26,6 @@
 /// A helper class that produces candidate suggestions for all of the
 /// declarations that are in scope at the completion location.
 class DeclarationHelper {
-  /// The regular expression used to detect an unused identifier (a sequence of
-  /// one or more underscores with no other characters).
-  static final RegExp UnusedIdentifier = RegExp(r'^_+$');
-
   /// The completion request being processed.
   final DartCompletionRequest request;
 
@@ -318,6 +315,10 @@
         continue;
       }
 
+      if (prefixElement.isWildcardVariable) {
+        continue;
+      }
+
       var importedLibrary = element.importedLibrary;
       if (importedLibrary == null) {
         continue;
@@ -661,6 +662,9 @@
     required Namespace namespace,
     required String? prefix,
   }) {
+    // Don't suggest declarations in wildcard prefixed namespaces.
+    if (_isWildcard(prefix)) return;
+
     var importData = ImportData(
       libraryUri: library.source.uri,
       prefix: prefix,
@@ -1384,9 +1388,8 @@
     return true;
   }
 
-  /// Returns `true` if the [identifier] is composed of one or more underscore
-  /// characters and nothing else.
-  bool _isUnused(String identifier) => UnusedIdentifier.hasMatch(identifier);
+  /// Returns `true` if the [identifier] is a wildcard (a single `_`).
+  bool _isWildcard(String? identifier) => identifier == '_';
 
   /// Record that the given [operation] should be performed in the second pass.
   void _recordOperation(NotImportedOperation operation) {
@@ -1622,6 +1625,8 @@
           (mustBeNonVoid && element.returnType is VoidType)) {
         return;
       }
+      // Don't suggest wildcard local functions.
+      if (_isWildcard(element.name)) return;
       var matcherScore = state.matcher.score(element.displayName);
       if (matcherScore != -1) {
         var suggestion = LocalFunctionSuggestion(
@@ -1695,7 +1700,7 @@
   /// Adds a suggestion for the parameter represented by the [element].
   void _suggestParameter(ParameterElement element) {
     if (visibilityTracker.isVisible(element: element, importData: null)) {
-      if (mustBeConstant || _isUnused(element.name)) {
+      if (mustBeConstant || _isWildcard(element.name)) {
         return;
       }
       var matcherScore = state.matcher.score(element.displayName);
@@ -1918,6 +1923,7 @@
 
   /// Adds a suggestion for the local variable represented by the [element].
   void _suggestVariable(LocalVariableElement element) {
+    if (element.isWildcardVariable) return;
     if (visibilityTracker.isVisible(element: element, importData: null)) {
       if (mustBeConstant && !element.isConst) {
         return;
diff --git a/pkg/analysis_server/test/services/completion/dart/declaration/wildcard_variables_test.dart b/pkg/analysis_server/test/services/completion/dart/declaration/wildcard_variables_test.dart
index 94edfcf..ff191d4 100644
--- a/pkg/analysis_server/test/services/completion/dart/declaration/wildcard_variables_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/declaration/wildcard_variables_test.dart
@@ -9,6 +9,7 @@
 void main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(WildcardFieldTest);
+    defineReflectiveTests(WildcardForLoopTest);
     defineReflectiveTests(WildcardImportPrefixTest);
     defineReflectiveTests(WildcardLocalVariableTest);
     defineReflectiveTests(WildcardParameterTest);
@@ -42,7 +43,6 @@
 ''');
   }
 
-  @FailingTest(reason: "the local '_' is shadowing the field")
   Future<void> test_argumentList_withLocal() async {
     await computeSuggestions('''
 void p(Object o) {}
@@ -63,14 +63,86 @@
 }
 
 @reflectiveTest
-class WildcardImportPrefixTest extends AbstractCompletionDriverTest {
+class WildcardForLoopTest extends AbstractCompletionDriverTest {
   @override
-  Set<String> allowedIdentifiers = {'_', 'isBlank'};
+  Set<String> allowedIdentifiers = {'_', '__'};
 
   @override
   bool get includeKeywords => false;
 
-  @FailingTest(reason: "'_' shouldn't be suggested")
+  Future<void> test_forEach_argumentList() async {
+    await computeSuggestions('''
+void p(Object o) {}
+
+void f() {
+  for (var _ in []) {
+    p(^);
+  }
+}
+''');
+    assertResponse('''
+suggestions
+''');
+  }
+
+  Future<void> test_forEach_argumentList_underscores() async {
+    await computeSuggestions('''
+void p(Object o) {}
+
+void f() {
+  for (var __ in []) {
+    p(^);
+  }
+}
+''');
+    assertResponse('''
+suggestions
+  __
+    kind: localVariable
+''');
+  }
+
+  Future<void> test_forParts_argumentList() async {
+    await computeSuggestions('''
+void p(Object o) {}
+
+void f() {
+  for (var _ = 0; ;) {
+    p(^);
+  }
+}
+''');
+    assertResponse('''
+suggestions
+''');
+  }
+
+  Future<void> test_forParts_argumentList_underscores() async {
+    await computeSuggestions('''
+void p(Object o) {}
+
+void f() {
+  for (var __ = 0; ;) {
+    p(^);
+  }
+}
+''');
+    assertResponse('''
+suggestions
+  __
+    kind: localVariable
+''');
+  }
+}
+
+@reflectiveTest
+class WildcardImportPrefixTest extends AbstractCompletionDriverTest {
+  @override
+  Set<String> allowedIdentifiers = {'_', '__', 'isBlank'};
+
+  @override
+  bool get includeKeywords => false;
+
   Future<void> test_argumentList() async {
     newFile('$testPackageLibPath/ext.dart', '''
 extension ES on String {
@@ -93,6 +165,31 @@
 ''');
   }
 
+  Future<void> test_argumentList_underscores() async {
+    newFile('$testPackageLibPath/ext.dart', '''
+extension ES on String {
+  bool get isBlank => false;
+}
+''');
+
+    await computeSuggestions('''
+import 'ext.dart' as __;
+
+void p(Object o) {}
+
+void f() {
+  p(^);
+}
+''');
+    assertResponse('''
+suggestions
+  __.ES
+    kind: extensionInvocation
+  __
+    kind: library
+''');
+  }
+
   Future<void> test_stringExtension_argumentList() async {
     newFile('$testPackageLibPath/ext.dart', '''
 extension ES on String {
@@ -120,12 +217,11 @@
 @reflectiveTest
 class WildcardLocalVariableTest extends AbstractCompletionDriverTest {
   @override
-  Set<String> allowedIdentifiers = {'_', 'b'};
+  Set<String> allowedIdentifiers = {'_', '__', 'b'};
 
   @override
   bool get includeKeywords => false;
 
-  @FailingTest(reason: "'_' shouldn't be suggested")
   Future<void> test_argumentList() async {
     await computeSuggestions('''
 void p(Object o) {}
@@ -136,17 +232,47 @@
 }
 ''');
     assertResponse(r'''
-  suggestions
+suggestions
   b
     kind: localVariable
 ''');
   }
+
+  Future<void> test_argumentList_function() async {
+    await computeSuggestions('''
+void p(Object o) {}
+
+void f() {
+  _() {}
+  p(^);
+}
+''');
+    assertResponse(r'''
+suggestions
+''');
+  }
+
+  Future<void> test_argumentList_underscores() async {
+    await computeSuggestions('''
+void p(Object o) {}
+
+void f() {
+  var __ = 0;
+  p(^);
+}
+''');
+    assertResponse(r'''
+suggestions
+  __
+    kind: localVariable
+''');
+  }
 }
 
 @reflectiveTest
 class WildcardParameterTest extends AbstractCompletionDriverTest {
   @override
-  Set<String> allowedIdentifiers = {'_', 'b'};
+  Set<String> allowedIdentifiers = {'_', '__', 'b'};
 
   @override
   bool get includeKeywords => false;
@@ -165,6 +291,21 @@
     kind: parameter
 ''');
   }
+
+  Future<void> test_argumentList_underscores() async {
+    await computeSuggestions('''
+void p(Object o) {}
+
+void f(int __) {
+  p(^);
+}
+''');
+    assertResponse('''
+suggestions
+  __
+    kind: parameter
+''');
+  }
 }
 
 /// Top level variables are binding so not technically wildcards but look just
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index bf7346d..4713c5c 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -4876,11 +4876,20 @@
   }
 
   List<CompilationUnitElementImpl> get _partUnits {
-    return parts
-        .map((e) => e.uri)
-        .whereType<DirectiveUriWithUnitImpl>()
-        .map((e) => e.unit)
-        .toList();
+    var result = <CompilationUnitElementImpl>[];
+
+    void visitParts(CompilationUnitElementImpl unit) {
+      for (var part in unit.parts) {
+        if (part.uri case DirectiveUriWithUnitImpl uri) {
+          var unit = uri.unit;
+          result.add(unit);
+          visitParts(unit);
+        }
+      }
+    }
+
+    visitParts(definingCompilationUnit);
+    return result;
   }
 
   @override
diff --git a/pkg/analyzer/test/src/summary/element_text.dart b/pkg/analyzer/test/src/summary/element_text.dart
index 329f3fe..3dc1509 100644
--- a/pkg/analyzer/test/src/summary/element_text.dart
+++ b/pkg/analyzer/test/src/summary/element_text.dart
@@ -106,7 +106,15 @@
       }
 
       _writeElements('parts', e.parts, (part) {
-        _writePartElement(part, onlyId: false);
+        _sink.writelnWithIndent(_idMap[part]);
+      });
+
+      _writeElements('units', e.units, (unit) {
+        _sink.writeIndent();
+        _elementPrinter.writeElement(unit);
+        _sink.withIndent(() {
+          _writeUnitElement(unit);
+        });
       });
 
       // All fragments have this library.
@@ -820,10 +828,7 @@
     var definingUnit = e.definingCompilationUnit;
     expect(definingUnit.libraryOrAugmentationElement, same(e));
     if (configuration.filter(definingUnit)) {
-      _sink.writelnWithIndent('definingUnit');
-      _sink.withIndent(() {
-        _writeUnitElement(definingUnit);
-      });
+      _elementPrinter.writeNamedElement('definingUnit', definingUnit);
     }
 
     if (e is LibraryElementImpl) {
@@ -1256,14 +1261,8 @@
     _writeElements('parameters', elements, _writeParameterElement);
   }
 
-  void _writePartElement(
-    PartElementImpl e, {
-    required bool onlyId,
-  }) {
+  void _writePartElement(PartElementImpl e) {
     _sink.writelnWithIndent(_idMap[e]);
-    if (onlyId) {
-      return;
-    }
 
     _sink.withIndent(() {
       var uri = e.uri;
@@ -1271,9 +1270,12 @@
         _sink.write('uri: ');
         _writeDirectiveUri(e.uri);
       });
+
+      _writeEnclosingElement(e);
       _writeMetadata(e);
+
       if (uri is DirectiveUriWithUnitImpl) {
-        _writeUnitElement(uri.unit);
+        _elementPrinter.writeNamedElement('unit', uri.unit);
       }
     });
   }
@@ -1582,7 +1584,6 @@
   }
 
   void _writeUnitElement(CompilationUnitElementImpl e) {
-    _writeReference(e);
     _writeEnclosingElement(e);
 
     if (configuration.withImports) {
@@ -1598,10 +1599,7 @@
     );
     _writeElements(
         'libraryExports', e.libraryExports, _writeLibraryExportElement);
-
-    _writeElements('parts', e.parts, (part) {
-      _writePartElement(part, onlyId: true);
-    });
+    _writeElements('parts', e.parts, _writePartElement);
 
     _writeElements('classes', e.classes, _writeInterfaceElement);
     _writeElements('enums', e.enums, _writeInterfaceElement);
diff --git a/pkg/analyzer/test/src/summary/elements_test.dart b/pkg/analyzer/test/src/summary/elements_test.dart
index 91fd662..b02e25d 100644
--- a/pkg/analyzer/test/src/summary/elements_test.dart
+++ b/pkg/analyzer/test/src/summary/elements_test.dart
@@ -77,46 +77,47 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          class A @36
-            reference: <testLibrary>::@fragment::package:test/a.dart::@class::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        class A @36
+          reference: <testLibrary>::@fragment::package:test/a.dart::@class::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@class::A::@constructor::new
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::A
+          methods
+            foo @47
+              reference: <testLibrary>::@fragment::package:test/a.dart::@class::A::@method::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::A
+              returnType: void
+          augmented
             constructors
-              synthetic @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@class::A::@constructor::new
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::A
+              <testLibrary>::@fragment::package:test/a.dart::@class::A::@constructor::new
             methods
-              foo @47
-                reference: <testLibrary>::@fragment::package:test/a.dart::@class::A::@method::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::A
-                returnType: void
-            augmented
-              constructors
-                <testLibrary>::@fragment::package:test/a.dart::@class::A::@constructor::new
-              methods
-                <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@method::bar
-                <testLibrary>::@fragment::package:test/a.dart::@class::A::@method::foo
-          augment class A @73
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@class::A
-            methods
-              bar @84
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@method::bar
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: void
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@method::bar
+              <testLibrary>::@fragment::package:test/a.dart::@class::A::@method::foo
+        augment class A @73
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@class::A
+          methods
+            bar @84
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@method::bar
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: void
 ''');
   }
 
@@ -138,53 +139,54 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          const @43
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
-          fields
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            const @43
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
             fields
-              static const foo @66
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                type: int
-                shouldUseTypeForInitializerInference: true
-                constantInitializer
-                  IntegerLiteral
-                    literal: 0 @72
-                    staticType: int
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              synthetic static get foo @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: int
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          fields
+            static const foo @66
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              constantInitializer
+                IntegerLiteral
+                  literal: 0 @72
+                  staticType: int
+          accessors
+            synthetic static get foo @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: int
 ''');
   }
 
@@ -204,53 +206,54 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
-          fields
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
             fields
-              static const foo @66
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                type: int
-                shouldUseTypeForInitializerInference: true
-                constantInitializer
-                  IntegerLiteral
-                    literal: 0 @72
-                    staticType: int
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              synthetic static get foo @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: int
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          fields
+            static const foo @66
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              constantInitializer
+                IntegerLiteral
+                  literal: 0 @72
+                  staticType: int
+          accessors
+            synthetic static get foo @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: int
 ''');
   }
 
@@ -272,53 +275,54 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          const @43
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
-          fields
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            const @43
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
             fields
-              final foo @59
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                type: int
-                shouldUseTypeForInitializerInference: true
-                constantInitializer
-                  IntegerLiteral
-                    literal: 0 @65
-                    staticType: int
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              synthetic get foo @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: int
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          fields
+            final foo @59
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              constantInitializer
+                IntegerLiteral
+                  literal: 0 @65
+                  staticType: int
+          accessors
+            synthetic get foo @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: int
 ''');
   }
 
@@ -338,49 +342,50 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
-          fields
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
             fields
-              final foo @59
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                type: int
-                shouldUseTypeForInitializerInference: true
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              synthetic get foo @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: int
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          fields
+            final foo @59
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+          accessors
+            synthetic get foo @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: int
 ''');
   }
 
@@ -429,101 +434,102 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @58
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a1.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a1.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a1.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a1.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a1.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @97
-            reference: <testLibrary>::@fragment::package:test/a1.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a1.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
-            augmentation: <testLibrary>::@fragment::package:test/a11.dart::@classAugmentation::A
+      definingUnit: <testLibrary>::@fragment::package:test/a1.dart
       augmentationImports
         package:test/a11.dart
           enclosingElement: <testLibrary>::@augmentation::package:test/a1.dart
           reference: <testLibrary>::@augmentation::package:test/a11.dart
-          definingUnit
-            reference: <testLibrary>::@fragment::package:test/a11.dart
-            enclosingElement: <testLibrary>::@augmentation::package:test/a11.dart
-            enclosingElement3: <testLibrary>::@fragment::package:test/a1.dart
-            classes
-              augment class A @41
-                reference: <testLibrary>::@fragment::package:test/a11.dart::@classAugmentation::A
-                enclosingElement: <testLibrary>::@fragment::package:test/a11.dart
-                augmentationTarget: <testLibrary>::@fragment::package:test/a1.dart::@classAugmentation::A
-                augmentation: <testLibrary>::@fragment::package:test/a12.dart::@classAugmentation::A
+          definingUnit: <testLibrary>::@fragment::package:test/a11.dart
         package:test/a12.dart
           enclosingElement: <testLibrary>::@augmentation::package:test/a1.dart
           reference: <testLibrary>::@augmentation::package:test/a12.dart
-          definingUnit
-            reference: <testLibrary>::@fragment::package:test/a12.dart
-            enclosingElement: <testLibrary>::@augmentation::package:test/a12.dart
-            enclosingElement3: <testLibrary>::@fragment::package:test/a1.dart
-            classes
-              augment class A @41
-                reference: <testLibrary>::@fragment::package:test/a12.dart::@classAugmentation::A
-                enclosingElement: <testLibrary>::@fragment::package:test/a12.dart
-                augmentationTarget: <testLibrary>::@fragment::package:test/a11.dart::@classAugmentation::A
-                augmentation: <testLibrary>::@fragment::package:test/a2.dart::@classAugmentation::A
+          definingUnit: <testLibrary>::@fragment::package:test/a12.dart
     package:test/a2.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a2.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a2.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a2.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @97
-            reference: <testLibrary>::@fragment::package:test/a2.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a2.dart
-            augmentationTarget: <testLibrary>::@fragment::package:test/a12.dart::@classAugmentation::A
-            augmentation: <testLibrary>::@fragment::package:test/a21.dart::@classAugmentation::A
+      definingUnit: <testLibrary>::@fragment::package:test/a2.dart
       augmentationImports
         package:test/a21.dart
           enclosingElement: <testLibrary>::@augmentation::package:test/a2.dart
           reference: <testLibrary>::@augmentation::package:test/a21.dart
-          definingUnit
-            reference: <testLibrary>::@fragment::package:test/a21.dart
-            enclosingElement: <testLibrary>::@augmentation::package:test/a21.dart
-            enclosingElement3: <testLibrary>::@fragment::package:test/a2.dart
-            classes
-              augment class A @41
-                reference: <testLibrary>::@fragment::package:test/a21.dart::@classAugmentation::A
-                enclosingElement: <testLibrary>::@fragment::package:test/a21.dart
-                augmentationTarget: <testLibrary>::@fragment::package:test/a2.dart::@classAugmentation::A
-                augmentation: <testLibrary>::@fragment::package:test/a22.dart::@classAugmentation::A
+          definingUnit: <testLibrary>::@fragment::package:test/a21.dart
         package:test/a22.dart
           enclosingElement: <testLibrary>::@augmentation::package:test/a2.dart
           reference: <testLibrary>::@augmentation::package:test/a22.dart
-          definingUnit
-            reference: <testLibrary>::@fragment::package:test/a22.dart
-            enclosingElement: <testLibrary>::@augmentation::package:test/a22.dart
-            enclosingElement3: <testLibrary>::@fragment::package:test/a2.dart
-            classes
-              augment class A @41
-                reference: <testLibrary>::@fragment::package:test/a22.dart::@classAugmentation::A
-                enclosingElement: <testLibrary>::@fragment::package:test/a22.dart
-                augmentationTarget: <testLibrary>::@fragment::package:test/a21.dart::@classAugmentation::A
+          definingUnit: <testLibrary>::@fragment::package:test/a22.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @58
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a1.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+    <testLibrary>::@fragment::package:test/a1.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a1.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @97
+          reference: <testLibrary>::@fragment::package:test/a1.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a1.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          augmentation: <testLibrary>::@fragment::package:test/a11.dart::@classAugmentation::A
+    <testLibrary>::@fragment::package:test/a11.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a11.dart
+      enclosingElement3: <testLibrary>::@fragment::package:test/a1.dart
+      classes
+        augment class A @41
+          reference: <testLibrary>::@fragment::package:test/a11.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a11.dart
+          augmentationTarget: <testLibrary>::@fragment::package:test/a1.dart::@classAugmentation::A
+          augmentation: <testLibrary>::@fragment::package:test/a12.dart::@classAugmentation::A
+    <testLibrary>::@fragment::package:test/a12.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a12.dart
+      enclosingElement3: <testLibrary>::@fragment::package:test/a1.dart
+      classes
+        augment class A @41
+          reference: <testLibrary>::@fragment::package:test/a12.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a12.dart
+          augmentationTarget: <testLibrary>::@fragment::package:test/a11.dart::@classAugmentation::A
+          augmentation: <testLibrary>::@fragment::package:test/a2.dart::@classAugmentation::A
+    <testLibrary>::@fragment::package:test/a2.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a2.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @97
+          reference: <testLibrary>::@fragment::package:test/a2.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a2.dart
+          augmentationTarget: <testLibrary>::@fragment::package:test/a12.dart::@classAugmentation::A
+          augmentation: <testLibrary>::@fragment::package:test/a21.dart::@classAugmentation::A
+    <testLibrary>::@fragment::package:test/a21.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a21.dart
+      enclosingElement3: <testLibrary>::@fragment::package:test/a2.dart
+      classes
+        augment class A @41
+          reference: <testLibrary>::@fragment::package:test/a21.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a21.dart
+          augmentationTarget: <testLibrary>::@fragment::package:test/a2.dart::@classAugmentation::A
+          augmentation: <testLibrary>::@fragment::package:test/a22.dart::@classAugmentation::A
+    <testLibrary>::@fragment::package:test/a22.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a22.dart
+      enclosingElement3: <testLibrary>::@fragment::package:test/a2.dart
+      classes
+        augment class A @41
+          reference: <testLibrary>::@fragment::package:test/a22.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a22.dart
+          augmentationTarget: <testLibrary>::@fragment::package:test/a21.dart::@classAugmentation::A
   exportedReferences
     declared <testLibraryFragment>::@class::A
   exportNamespace
@@ -555,58 +561,59 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @44
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @44
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          constructors
+            synthetic @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0::@constructor::new
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0
+          methods
+            foo1 @55
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0::@method::foo1
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0
+              returnType: void
+        class A @74
+          reference: <testLibrary>::@fragment::package:test/a.dart::@class::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1
+          constructors
+            synthetic @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@class::A::@constructor::new
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::A
+          methods
+            foo2 @85
+              reference: <testLibrary>::@fragment::package:test/a.dart::@class::A::@method::foo2
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::A
+              returnType: void
+          augmented
             constructors
-              synthetic @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0::@constructor::new
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0
+              <testLibrary>::@fragment::package:test/a.dart::@class::A::@constructor::new
             methods
-              foo1 @55
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0::@method::foo1
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0
-                returnType: void
-          class A @74
-            reference: <testLibrary>::@fragment::package:test/a.dart::@class::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1
-            constructors
-              synthetic @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@class::A::@constructor::new
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::A
-            methods
-              foo2 @85
-                reference: <testLibrary>::@fragment::package:test/a.dart::@class::A::@method::foo2
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::A
-                returnType: void
-            augmented
-              constructors
-                <testLibrary>::@fragment::package:test/a.dart::@class::A::@constructor::new
-              methods
-                <testLibrary>::@fragment::package:test/a.dart::@class::A::@method::foo2
-                <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1::@method::foo3
-          augment class A @112
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@class::A
-            methods
-              foo3 @123
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1::@method::foo3
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1
-                returnType: void
+              <testLibrary>::@fragment::package:test/a.dart::@class::A::@method::foo2
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1::@method::foo3
+        augment class A @112
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@class::A
+          methods
+            foo3 @123
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1::@method::foo3
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1
+              returnType: void
 ''');
   }
 
@@ -634,63 +641,64 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class B @31
-        reference: <testLibraryFragment>::@class::B
-        enclosingElement: <testLibraryFragment>
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::B::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::B
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @68
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-            constructors
-              synthetic @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::new
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            methods
-              foo1 @79
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@method::foo1
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: void
-            augmented
-              constructors
-                <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::new
-              methods
-                <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@method::foo1
-                <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@method::foo2
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
       augmentationImports
         package:test/b.dart
           enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
           reference: <testLibrary>::@augmentation::package:test/b.dart
-          definingUnit
-            reference: <testLibrary>::@fragment::package:test/b.dart
-            enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-            enclosingElement3: <testLibrary>::@fragment::package:test/a.dart
-            classes
-              augment class A @40
-                reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-                enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-                augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                methods
-                  foo2 @51
-                    reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@method::foo2
-                    enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-                    returnType: void
+          definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class B @31
+          reference: <testLibraryFragment>::@class::B
+          enclosingElement: <testLibraryFragment>
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::B::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::B
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @68
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::new
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          methods
+            foo1 @79
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@method::foo1
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: void
+          augmented
+            constructors
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::new
+            methods
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@method::foo1
+              <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@method::foo2
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibrary>::@fragment::package:test/a.dart
+      classes
+        augment class A @40
+          reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          methods
+            foo2 @51
+              reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@method::foo2
+              enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+              returnType: void
 ''');
   }
 
@@ -712,60 +720,61 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          foo @41
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            shouldUseTypeForInitializerInference: true
-        accessors
-          synthetic get foo @-1
-            reference: <testLibraryFragment>::@class::A::@getter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-          synthetic set foo= @-1
-            reference: <testLibraryFragment>::@class::A::@setter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional _foo @-1
-                type: int
-            returnType: void
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::foo
-          constructors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::foo
-          accessors
-            <testLibraryFragment>::@class::A::@getter::foo
-            <testLibraryFragment>::@class::A::@setter::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            foo @41
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+          accessors
+            synthetic get foo @-1
+              reference: <testLibraryFragment>::@class::A::@getter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+            synthetic set foo= @-1
+              reference: <testLibraryFragment>::@class::A::@setter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional _foo @-1
+                  type: int
+              returnType: void
+          augmented
+            fields
+              <testLibraryFragment>::@class::A::@field::foo
             constructors
-              augment foo @59
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                periodOffset: 58
-                nameEnd: 62
-                augmentationTargetAny: <testLibraryFragment>::@class::A::@getter::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::foo
+            accessors
+              <testLibraryFragment>::@class::A::@getter::foo
+              <testLibraryFragment>::@class::A::@setter::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          constructors
+            augment foo @59
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              periodOffset: 58
+              nameEnd: 62
+              augmentationTargetAny: <testLibraryFragment>::@class::A::@getter::foo
 ''');
   }
 
@@ -787,51 +796,52 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          synthetic foo @-1
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-        accessors
-          get foo @45
-            reference: <testLibraryFragment>::@class::A::@getter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::foo
-          constructors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::foo
-          accessors
-            <testLibraryFragment>::@class::A::@getter::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            synthetic foo @-1
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+          accessors
+            get foo @45
+              reference: <testLibraryFragment>::@class::A::@getter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+          augmented
+            fields
+              <testLibraryFragment>::@class::A::@field::foo
             constructors
-              augment foo @59
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                periodOffset: 58
-                nameEnd: 62
-                augmentationTargetAny: <testLibraryFragment>::@class::A::@getter::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::foo
+            accessors
+              <testLibraryFragment>::@class::A::@getter::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          constructors
+            augment foo @59
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              periodOffset: 58
+              nameEnd: 62
+              augmentationTargetAny: <testLibraryFragment>::@class::A::@getter::foo
 ''');
   }
 
@@ -853,44 +863,45 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        methods
-          foo @42
-            reference: <testLibraryFragment>::@class::A::@method::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: void
-        augmented
-          constructors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::foo
-          methods
-            <testLibraryFragment>::@class::A::@method::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          methods
+            foo @42
+              reference: <testLibraryFragment>::@class::A::@method::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: void
+          augmented
             constructors
-              augment foo @59
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                periodOffset: 58
-                nameEnd: 62
-                augmentationTargetAny: <testLibraryFragment>::@class::A::@method::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::foo
+            methods
+              <testLibraryFragment>::@class::A::@method::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          constructors
+            augment foo @59
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              periodOffset: 58
+              nameEnd: 62
+              augmentationTargetAny: <testLibraryFragment>::@class::A::@method::foo
 ''');
   }
 
@@ -912,54 +923,55 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          synthetic foo @-1
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-        accessors
-          set foo= @41
-            reference: <testLibraryFragment>::@class::A::@setter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional _ @49
-                type: int
-            returnType: void
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::foo
-          constructors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::foo
-          accessors
-            <testLibraryFragment>::@class::A::@setter::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            synthetic foo @-1
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+          accessors
+            set foo= @41
+              reference: <testLibraryFragment>::@class::A::@setter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional _ @49
+                  type: int
+              returnType: void
+          augmented
+            fields
+              <testLibraryFragment>::@class::A::@field::foo
             constructors
-              augment foo @59
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                periodOffset: 58
-                nameEnd: 62
-                augmentationTargetAny: <testLibraryFragment>::@class::A::@setter::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::foo
+            accessors
+              <testLibraryFragment>::@class::A::@setter::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          constructors
+            augment foo @59
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              periodOffset: 58
+              nameEnd: 62
+              augmentationTargetAny: <testLibraryFragment>::@class::A::@setter::foo
 ''');
   }
 
@@ -979,36 +991,37 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        augmented
-          constructors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::named
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          augmented
             constructors
-              named @51
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::named
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                periodOffset: 50
-                nameEnd: 56
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::named
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          constructors
+            named @51
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::named
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              periodOffset: 50
+              nameEnd: 56
 ''');
   }
 
@@ -1028,47 +1041,48 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        typeParameters
-          covariant T1 @33
-            defaultType: dynamic
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        augmented
-          constructors
-            ConstructorMember
-              base: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::named
-              augmentationSubstitution: {T2: T1}
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            typeParameters
-              covariant T2 @45
-                defaultType: dynamic
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          typeParameters
+            covariant T1 @33
+              defaultType: dynamic
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          augmented
             constructors
-              named @55
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::named
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                periodOffset: 54
-                nameEnd: 60
-                parameters
-                  requiredPositional a @64
-                    type: T2
+              ConstructorMember
+                base: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::named
+                augmentationSubstitution: {T2: T1}
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          typeParameters
+            covariant T2 @45
+              defaultType: dynamic
+          augmentationTarget: <testLibraryFragment>::@class::A
+          constructors
+            named @55
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::named
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              periodOffset: 54
+              nameEnd: 60
+              parameters
+                requiredPositional a @64
+                  type: T2
 ''');
   }
 
@@ -1090,41 +1104,42 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          @37
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::named
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            @37
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
             constructors
-              named @51
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::named
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                periodOffset: 50
-                nameEnd: 56
+              <testLibraryFragment>::@class::A::@constructor::new
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::named
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          constructors
+            named @51
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::named
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              periodOffset: 50
+              nameEnd: 56
 ''');
   }
 
@@ -1144,34 +1159,35 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        augmented
-          constructors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::new
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          augmented
             constructors
-              @49
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::new
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::new
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          constructors
+            @49
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::new
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
 ''');
   }
 
@@ -1193,41 +1209,42 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          named @39
-            reference: <testLibraryFragment>::@class::A::@constructor::named
-            enclosingElement: <testLibraryFragment>::@class::A
-            periodOffset: 38
-            nameEnd: 44
-        augmented
-          constructors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::new
-            <testLibraryFragment>::@class::A::@constructor::named
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            named @39
+              reference: <testLibraryFragment>::@class::A::@constructor::named
+              enclosingElement: <testLibraryFragment>::@class::A
+              periodOffset: 38
+              nameEnd: 44
+          augmented
             constructors
-              @49
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::new
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::new
+              <testLibraryFragment>::@class::A::@constructor::named
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          constructors
+            @49
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::new
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
 ''');
   }
 
@@ -1249,54 +1266,55 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          final f @47
-            reference: <testLibraryFragment>::@class::A::@field::f
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-        accessors
-          synthetic get f @-1
-            reference: <testLibraryFragment>::@class::A::@getter::f
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::f
-          constructors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::named
-          accessors
-            <testLibraryFragment>::@class::A::@getter::f
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            final f @47
+              reference: <testLibraryFragment>::@class::A::@field::f
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+          accessors
+            synthetic get f @-1
+              reference: <testLibraryFragment>::@class::A::@getter::f
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+          augmented
+            fields
+              <testLibraryFragment>::@class::A::@field::f
             constructors
-              named @51
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::named
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                periodOffset: 50
-                nameEnd: 56
-                parameters
-                  requiredPositional final this.f @62
-                    type: int
-                    field: <testLibraryFragment>::@class::A::@field::f
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::named
+            accessors
+              <testLibraryFragment>::@class::A::@getter::f
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          constructors
+            named @51
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::named
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              periodOffset: 50
+              nameEnd: 56
+              parameters
+                requiredPositional final this.f @62
+                  type: int
+                  field: <testLibraryFragment>::@class::A::@field::f
 ''');
   }
 
@@ -1318,60 +1336,61 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          final f @47
-            reference: <testLibraryFragment>::@class::A::@field::f
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-        accessors
-          synthetic get f @-1
-            reference: <testLibraryFragment>::@class::A::@getter::f
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::f
-          constructors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::named
-          accessors
-            <testLibraryFragment>::@class::A::@getter::f
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            final f @47
+              reference: <testLibraryFragment>::@class::A::@field::f
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+          accessors
+            synthetic get f @-1
+              reference: <testLibraryFragment>::@class::A::@getter::f
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+          augmented
+            fields
+              <testLibraryFragment>::@class::A::@field::f
             constructors
-              const named @57
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::named
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                periodOffset: 56
-                nameEnd: 62
-                constantInitializers
-                  ConstructorFieldInitializer
-                    fieldName: SimpleIdentifier
-                      token: f @67
-                      staticElement: <testLibraryFragment>::@class::A::@field::f
-                      staticType: null
-                    equals: = @69
-                    expression: IntegerLiteral
-                      literal: 0 @71
-                      staticType: int
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::named
+            accessors
+              <testLibraryFragment>::@class::A::@getter::f
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          constructors
+            const named @57
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructor::named
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              periodOffset: 56
+              nameEnd: 62
+              constantInitializers
+                ConstructorFieldInitializer
+                  fieldName: SimpleIdentifier
+                    token: f @67
+                    staticElement: <testLibraryFragment>::@class::A::@field::f
+                    staticType: null
+                  equals: = @69
+                  expression: IntegerLiteral
+                    literal: 0 @71
+                    staticType: int
 ''');
   }
 
@@ -1394,46 +1413,47 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          foo @39
-            reference: <testLibraryFragment>::@class::A::@constructor::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            periodOffset: 38
-            nameEnd: 42
-        augmented
-          fields
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            foo @39
+              reference: <testLibraryFragment>::@class::A::@constructor::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              periodOffset: 38
+              nameEnd: 42
+          augmented
             fields
-              augment foo @61
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                type: int
-                shouldUseTypeForInitializerInference: true
-                id: field_0
-                augmentationTargetAny: <testLibraryFragment>::@class::A::@constructor::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          fields
+            augment foo @61
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              id: field_0
+              augmentationTargetAny: <testLibraryFragment>::@class::A::@constructor::foo
 ''');
   }
 
@@ -1456,73 +1476,74 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          foo @41
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            shouldUseTypeForInitializerInference: true
-            id: field_0
-            getter: getter_0
-            setter: setter_0
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          synthetic get foo @-1
-            reference: <testLibraryFragment>::@class::A::@getter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-            id: getter_0
-            variable: field_0
-          synthetic set foo= @-1
-            reference: <testLibraryFragment>::@class::A::@setter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional _foo @-1
-                type: int
-            returnType: void
-            id: setter_0
-            variable: field_0
-        augmented
-          fields
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibraryFragment>::@class::A::@getter::foo
-            <testLibraryFragment>::@class::A::@setter::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            foo @41
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              id: field_0
+              getter: getter_0
+              setter: setter_0
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            synthetic get foo @-1
+              reference: <testLibraryFragment>::@class::A::@getter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+              id: getter_0
+              variable: field_0
+            synthetic set foo= @-1
+              reference: <testLibraryFragment>::@class::A::@setter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional _foo @-1
+                  type: int
+              returnType: void
+              id: setter_0
+              variable: field_0
+          augmented
             fields
-              augment foo @61
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                type: int
-                shouldUseTypeForInitializerInference: true
-                id: field_1
-                augmentationTarget: <testLibraryFragment>::@class::A::@field::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+            accessors
+              <testLibraryFragment>::@class::A::@getter::foo
+              <testLibraryFragment>::@class::A::@setter::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          fields
+            augment foo @61
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              id: field_1
+              augmentationTarget: <testLibraryFragment>::@class::A::@field::foo
 ''');
   }
 
@@ -1553,95 +1574,96 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @56
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          foo @66
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            shouldUseTypeForInitializerInference: true
-            id: field_0
-            getter: getter_0
-            setter: setter_0
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          synthetic get foo @-1
-            reference: <testLibraryFragment>::@class::A::@getter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-            id: getter_0
-            variable: field_0
-          synthetic set foo= @-1
-            reference: <testLibraryFragment>::@class::A::@setter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional _foo @-1
-                type: int
-            returnType: void
-            id: setter_0
-            variable: field_0
-        augmented
-          fields
-            <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibraryFragment>::@class::A::@getter::foo
-            <testLibraryFragment>::@class::A::@setter::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
-            augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-            fields
-              augment foo @61
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                type: int
-                shouldUseTypeForInitializerInference: true
-                id: field_1
-                augmentationTarget: <testLibraryFragment>::@class::A::@field::foo
-                augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
     package:test/b.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @56
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            foo @66
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              id: field_0
+              getter: getter_0
+              setter: setter_0
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            synthetic get foo @-1
+              reference: <testLibraryFragment>::@class::A::@getter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+              id: getter_0
+              variable: field_0
+            synthetic set foo= @-1
+              reference: <testLibraryFragment>::@class::A::@setter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional _foo @-1
+                  type: int
+              returnType: void
+              id: setter_0
+              variable: field_0
+          augmented
             fields
-              augment foo @61
-                reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-                type: int
-                shouldUseTypeForInitializerInference: true
-                id: field_2
-                augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+              <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+            accessors
+              <testLibraryFragment>::@class::A::@getter::foo
+              <testLibraryFragment>::@class::A::@setter::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          fields
+            augment foo @61
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              id: field_1
+              augmentationTarget: <testLibraryFragment>::@class::A::@field::foo
+              augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            augment foo @61
+              reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              id: field_2
+              augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
 ''');
   }
 
@@ -1672,95 +1694,96 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @56
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          foo @66
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            shouldUseTypeForInitializerInference: true
-            id: field_0
-            getter: getter_0
-            setter: setter_0
-            augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          synthetic get foo @-1
-            reference: <testLibraryFragment>::@class::A::@getter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-            id: getter_0
-            variable: field_0
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
-          synthetic set foo= @-1
-            reference: <testLibraryFragment>::@class::A::@setter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional _foo @-1
-                type: int
-            returnType: void
-            id: setter_0
-            variable: field_0
-        augmented
-          fields
-            <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
-            <testLibraryFragment>::@class::A::@setter::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
-            augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-            accessors
-              augment get foo @65
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: int
-                id: getter_1
-                variable: field_0
-                augmentationTarget: <testLibraryFragment>::@class::A::@getter::foo
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
     package:test/b.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @56
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            foo @66
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              id: field_0
+              getter: getter_0
+              setter: setter_0
+              augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            synthetic get foo @-1
+              reference: <testLibraryFragment>::@class::A::@getter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+              id: getter_0
+              variable: field_0
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+            synthetic set foo= @-1
+              reference: <testLibraryFragment>::@class::A::@setter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional _foo @-1
+                  type: int
+              returnType: void
+              id: setter_0
+              variable: field_0
+          augmented
             fields
-              augment foo @61
-                reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-                type: int
-                shouldUseTypeForInitializerInference: true
-                id: field_1
-                augmentationTarget: <testLibraryFragment>::@class::A::@field::foo
+              <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+            accessors
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+              <testLibraryFragment>::@class::A::@setter::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          accessors
+            augment get foo @65
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: int
+              id: getter_1
+              variable: field_0
+              augmentationTarget: <testLibraryFragment>::@class::A::@getter::foo
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            augment foo @61
+              reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              id: field_1
+              augmentationTarget: <testLibraryFragment>::@class::A::@field::foo
 ''');
   }
 
@@ -1791,98 +1814,99 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @56
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          foo @66
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            shouldUseTypeForInitializerInference: true
-            id: field_0
-            getter: getter_0
-            setter: setter_0
-            augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          synthetic get foo @-1
-            reference: <testLibraryFragment>::@class::A::@getter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-            id: getter_0
-            variable: field_0
-          synthetic set foo= @-1
-            reference: <testLibraryFragment>::@class::A::@setter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional _foo @-1
-                type: int
-            returnType: void
-            id: setter_0
-            variable: field_0
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
-        augmented
-          fields
-            <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibraryFragment>::@class::A::@getter::foo
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
-            augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-            accessors
-              augment set foo= @61
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                parameters
-                  requiredPositional _ @69
-                    type: int
-                returnType: void
-                id: setter_1
-                variable: field_0
-                augmentationTarget: <testLibraryFragment>::@class::A::@setter::foo
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
     package:test/b.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @56
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            foo @66
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              id: field_0
+              getter: getter_0
+              setter: setter_0
+              augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            synthetic get foo @-1
+              reference: <testLibraryFragment>::@class::A::@getter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+              id: getter_0
+              variable: field_0
+            synthetic set foo= @-1
+              reference: <testLibraryFragment>::@class::A::@setter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional _foo @-1
+                  type: int
+              returnType: void
+              id: setter_0
+              variable: field_0
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
+          augmented
             fields
-              augment foo @61
-                reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-                type: int
-                shouldUseTypeForInitializerInference: true
-                id: field_1
-                augmentationTarget: <testLibraryFragment>::@class::A::@field::foo
+              <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+            accessors
+              <testLibraryFragment>::@class::A::@getter::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          accessors
+            augment set foo= @61
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              parameters
+                requiredPositional _ @69
+                  type: int
+              returnType: void
+              id: setter_1
+              variable: field_0
+              augmentationTarget: <testLibraryFragment>::@class::A::@setter::foo
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            augment foo @61
+              reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              id: field_1
+              augmentationTarget: <testLibraryFragment>::@class::A::@field::foo
 ''');
   }
 
@@ -1905,69 +1929,70 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          static const foo @54
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            shouldUseTypeForInitializerInference: true
-            constantInitializer
-              IntegerLiteral
-                literal: 0 @60
-                staticType: int
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          synthetic static get foo @-1
-            reference: <testLibraryFragment>::@class::A::@getter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-        augmented
-          fields
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibraryFragment>::@class::A::@getter::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            static const foo @54
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              constantInitializer
+                IntegerLiteral
+                  literal: 0 @60
+                  staticType: int
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            synthetic static get foo @-1
+              reference: <testLibraryFragment>::@class::A::@getter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+          augmented
             fields
-              augment static const foo @75
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                type: int
-                shouldUseTypeForInitializerInference: true
-                constantInitializer
-                  AugmentedInvocation
-                    augmentedKeyword: augmented @81
-                    arguments: ArgumentList
-                      leftParenthesis: ( @90
-                      rightParenthesis: ) @91
-                    element: <null>
-                    staticType: InvalidType
-                augmentationTarget: <testLibraryFragment>::@class::A::@field::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+            accessors
+              <testLibraryFragment>::@class::A::@getter::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          fields
+            augment static const foo @75
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              constantInitializer
+                AugmentedInvocation
+                  augmentedKeyword: augmented @81
+                  arguments: ArgumentList
+                    leftParenthesis: ( @90
+                    rightParenthesis: ) @91
+                  element: <null>
+                  staticType: InvalidType
+              augmentationTarget: <testLibraryFragment>::@class::A::@field::foo
 ''');
   }
 
@@ -1990,73 +2015,74 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          foo @41
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            shouldUseTypeForInitializerInference: true
-            id: field_0
-            getter: getter_0
-            setter: setter_0
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          synthetic get foo @-1
-            reference: <testLibraryFragment>::@class::A::@getter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-            id: getter_0
-            variable: field_0
-          synthetic set foo= @-1
-            reference: <testLibraryFragment>::@class::A::@setter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional _foo @-1
-                type: int
-            returnType: void
-            id: setter_0
-            variable: field_0
-        augmented
-          fields
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibraryFragment>::@class::A::@getter::foo
-            <testLibraryFragment>::@class::A::@setter::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            foo @41
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              id: field_0
+              getter: getter_0
+              setter: setter_0
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            synthetic get foo @-1
+              reference: <testLibraryFragment>::@class::A::@getter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+              id: getter_0
+              variable: field_0
+            synthetic set foo= @-1
+              reference: <testLibraryFragment>::@class::A::@setter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional _foo @-1
+                  type: int
+              returnType: void
+              id: setter_0
+              variable: field_0
+          augmented
             fields
-              augment foo @64
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                type: double
-                shouldUseTypeForInitializerInference: true
-                id: field_1
-                augmentationTarget: <testLibraryFragment>::@class::A::@field::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+            accessors
+              <testLibraryFragment>::@class::A::@getter::foo
+              <testLibraryFragment>::@class::A::@setter::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          fields
+            augment foo @64
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              type: double
+              shouldUseTypeForInitializerInference: true
+              id: field_1
+              augmentationTarget: <testLibraryFragment>::@class::A::@field::foo
 ''');
   }
 
@@ -2079,74 +2105,75 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          final foo @47
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            shouldUseTypeForInitializerInference: true
-            constantInitializer
-              IntegerLiteral
-                literal: 0 @53
-                staticType: int
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-        constructors
-          const @64
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          synthetic get foo @-1
-            reference: <testLibraryFragment>::@class::A::@getter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-        augmented
-          fields
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibraryFragment>::@class::A::@getter::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            final foo @47
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              constantInitializer
+                IntegerLiteral
+                  literal: 0 @53
+                  staticType: int
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+          constructors
+            const @64
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            synthetic get foo @-1
+              reference: <testLibraryFragment>::@class::A::@getter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+          augmented
             fields
-              augment final foo @67
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                type: int
-                shouldUseTypeForInitializerInference: true
-                constantInitializer
-                  BinaryExpression
-                    leftOperand: AugmentedExpression
-                      augmentedKeyword: augmented @73
-                      element: <testLibraryFragment>::@class::A::@field::foo
-                      staticType: int
-                    operator: + @83
-                    rightOperand: IntegerLiteral
-                      literal: 1 @85
-                      staticType: int
-                    staticElement: dart:core::<fragment>::@class::num::@method::+
-                    staticInvokeType: num Function(num)
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+            accessors
+              <testLibraryFragment>::@class::A::@getter::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          fields
+            augment final foo @67
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              constantInitializer
+                BinaryExpression
+                  leftOperand: AugmentedExpression
+                    augmentedKeyword: augmented @73
+                    element: <testLibraryFragment>::@class::A::@field::foo
                     staticType: int
-                augmentationTarget: <testLibraryFragment>::@class::A::@field::foo
+                  operator: + @83
+                  rightOperand: IntegerLiteral
+                    literal: 1 @85
+                    staticType: int
+                  staticElement: dart:core::<fragment>::@class::num::@method::+
+                  staticInvokeType: num Function(num)
+                  staticType: int
+              augmentationTarget: <testLibraryFragment>::@class::A::@field::foo
 ''');
   }
 
@@ -2171,61 +2198,62 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          synthetic foo @-1
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            id: field_0
-            getter: getter_0
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          get foo @45
-            reference: <testLibraryFragment>::@class::A::@getter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-            id: getter_0
-            variable: field_0
-        augmented
-          fields
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibraryFragment>::@class::A::@getter::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            synthetic foo @-1
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              id: field_0
+              getter: getter_0
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            get foo @45
+              reference: <testLibraryFragment>::@class::A::@getter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+              id: getter_0
+              variable: field_0
+          augmented
             fields
-              augment foo @61
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                type: int
-                shouldUseTypeForInitializerInference: true
-                id: field_1
-                augmentationTarget: <testLibraryFragment>::@class::A::@field::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+            accessors
+              <testLibraryFragment>::@class::A::@getter::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          fields
+            augment foo @61
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              id: field_1
+              augmentationTarget: <testLibraryFragment>::@class::A::@field::foo
 ''');
   }
 
@@ -2248,51 +2276,52 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        methods
-          foo @42
-            reference: <testLibraryFragment>::@class::A::@method::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: void
-        augmented
-          fields
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          methods
-            <testLibraryFragment>::@class::A::@method::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          methods
+            foo @42
+              reference: <testLibraryFragment>::@class::A::@method::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: void
+          augmented
             fields
-              augment foo @61
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                type: int
-                shouldUseTypeForInitializerInference: true
-                id: field_0
-                augmentationTargetAny: <testLibraryFragment>::@class::A::@method::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+            methods
+              <testLibraryFragment>::@class::A::@method::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          fields
+            augment foo @61
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              id: field_0
+              augmentationTargetAny: <testLibraryFragment>::@class::A::@method::foo
 ''');
   }
 
@@ -2317,64 +2346,65 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          synthetic foo @-1
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            id: field_0
-            setter: setter_0
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          set foo= @41
-            reference: <testLibraryFragment>::@class::A::@setter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional _ @49
-                type: int
-            returnType: void
-            id: setter_0
-            variable: field_0
-        augmented
-          fields
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibraryFragment>::@class::A::@setter::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            synthetic foo @-1
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              id: field_0
+              setter: setter_0
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            set foo= @41
+              reference: <testLibraryFragment>::@class::A::@setter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional _ @49
+                  type: int
+              returnType: void
+              id: setter_0
+              variable: field_0
+          augmented
             fields
-              augment foo @61
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                type: int
-                shouldUseTypeForInitializerInference: true
-                id: field_1
-                augmentationTarget: <testLibraryFragment>::@class::A::@field::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+            accessors
+              <testLibraryFragment>::@class::A::@setter::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          fields
+            augment foo @61
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              id: field_1
+              augmentationTarget: <testLibraryFragment>::@class::A::@field::foo
 ''');
   }
 
@@ -2397,92 +2427,93 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          foo1 @41
-            reference: <testLibraryFragment>::@class::A::@field::foo1
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            shouldUseTypeForInitializerInference: true
-            id: field_0
-            getter: getter_0
-            setter: setter_0
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          synthetic get foo1 @-1
-            reference: <testLibraryFragment>::@class::A::@getter::foo1
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-            id: getter_0
-            variable: field_0
-          synthetic set foo1= @-1
-            reference: <testLibraryFragment>::@class::A::@setter::foo1
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional _foo1 @-1
-                type: int
-            returnType: void
-            id: setter_0
-            variable: field_0
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::foo1
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo2
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibraryFragment>::@class::A::@getter::foo1
-            <testLibraryFragment>::@class::A::@setter::foo1
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo2
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setter::foo2
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            foo1 @41
+              reference: <testLibraryFragment>::@class::A::@field::foo1
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              id: field_0
+              getter: getter_0
+              setter: setter_0
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            synthetic get foo1 @-1
+              reference: <testLibraryFragment>::@class::A::@getter::foo1
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+              id: getter_0
+              variable: field_0
+            synthetic set foo1= @-1
+              reference: <testLibraryFragment>::@class::A::@setter::foo1
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional _foo1 @-1
+                  type: int
+              returnType: void
+              id: setter_0
+              variable: field_0
+          augmented
             fields
-              foo2 @53
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo2
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                type: int
-                shouldUseTypeForInitializerInference: true
-                id: field_1
-                getter: getter_1
-                setter: setter_1
+              <testLibraryFragment>::@class::A::@field::foo1
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo2
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              synthetic get foo2 @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo2
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: int
-                id: getter_1
-                variable: field_1
-              synthetic set foo2= @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setter::foo2
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                parameters
-                  requiredPositional _foo2 @-1
-                    type: int
-                returnType: void
-                id: setter_1
-                variable: field_1
+              <testLibraryFragment>::@class::A::@getter::foo1
+              <testLibraryFragment>::@class::A::@setter::foo1
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo2
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setter::foo2
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          fields
+            foo2 @53
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo2
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              id: field_1
+              getter: getter_1
+              setter: setter_1
+          accessors
+            synthetic get foo2 @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo2
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: int
+              id: getter_1
+              variable: field_1
+            synthetic set foo2= @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setter::foo2
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              parameters
+                requiredPositional _foo2 @-1
+                  type: int
+              returnType: void
+              id: setter_1
+              variable: field_1
 ''');
   }
 
@@ -2505,102 +2536,103 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        typeParameters
-          covariant T1 @33
-            defaultType: dynamic
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          foo1 @44
-            reference: <testLibraryFragment>::@class::A::@field::foo1
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: T1
-            id: field_0
-            getter: getter_0
-            setter: setter_0
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          synthetic get foo1 @-1
-            reference: <testLibraryFragment>::@class::A::@getter::foo1
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: T1
-            id: getter_0
-            variable: field_0
-          synthetic set foo1= @-1
-            reference: <testLibraryFragment>::@class::A::@setter::foo1
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional _foo1 @-1
-                type: T1
-            returnType: void
-            id: setter_0
-            variable: field_0
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::foo1
-            FieldMember
-              base: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo2
-              augmentationSubstitution: {T2: T1}
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibraryFragment>::@class::A::@getter::foo1
-            <testLibraryFragment>::@class::A::@setter::foo1
-            PropertyAccessorMember
-              base: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo2
-              augmentationSubstitution: {T2: T1}
-            PropertyAccessorMember
-              base: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setter::foo2
-              augmentationSubstitution: {T2: T1}
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            typeParameters
-              covariant T2 @45
-                defaultType: dynamic
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          typeParameters
+            covariant T1 @33
+              defaultType: dynamic
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            foo1 @44
+              reference: <testLibraryFragment>::@class::A::@field::foo1
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: T1
+              id: field_0
+              getter: getter_0
+              setter: setter_0
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            synthetic get foo1 @-1
+              reference: <testLibraryFragment>::@class::A::@getter::foo1
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: T1
+              id: getter_0
+              variable: field_0
+            synthetic set foo1= @-1
+              reference: <testLibraryFragment>::@class::A::@setter::foo1
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional _foo1 @-1
+                  type: T1
+              returnType: void
+              id: setter_0
+              variable: field_0
+          augmented
             fields
-              foo2 @56
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo2
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                type: T2
-                id: field_1
-                getter: getter_1
-                setter: setter_1
+              <testLibraryFragment>::@class::A::@field::foo1
+              FieldMember
+                base: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo2
+                augmentationSubstitution: {T2: T1}
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              synthetic get foo2 @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo2
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: T2
-                id: getter_1
-                variable: field_1
-              synthetic set foo2= @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setter::foo2
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                parameters
-                  requiredPositional _foo2 @-1
-                    type: T2
-                returnType: void
-                id: setter_1
-                variable: field_1
+              <testLibraryFragment>::@class::A::@getter::foo1
+              <testLibraryFragment>::@class::A::@setter::foo1
+              PropertyAccessorMember
+                base: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo2
+                augmentationSubstitution: {T2: T1}
+              PropertyAccessorMember
+                base: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setter::foo2
+                augmentationSubstitution: {T2: T1}
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          typeParameters
+            covariant T2 @45
+              defaultType: dynamic
+          augmentationTarget: <testLibraryFragment>::@class::A
+          fields
+            foo2 @56
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo2
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              type: T2
+              id: field_1
+              getter: getter_1
+              setter: setter_1
+          accessors
+            synthetic get foo2 @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo2
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: T2
+              id: getter_1
+              variable: field_1
+            synthetic set foo2= @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setter::foo2
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              parameters
+                requiredPositional _foo2 @-1
+                  type: T2
+              returnType: void
+              id: setter_1
+              variable: field_1
 ''');
   }
 
@@ -2622,52 +2654,53 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          @37
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional final this.foo @44
-                type: int
-                field: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
-        augmented
-          fields
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            @37
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional final this.foo @44
+                  type: int
+                  field: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
+          augmented
             fields
-              final foo @59
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                type: int
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              synthetic get foo @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: int
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          fields
+            final foo @59
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              type: int
+          accessors
+            synthetic get foo @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: int
 ''');
   }
 
@@ -2689,58 +2722,59 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          const @43
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-            constantInitializers
-              ConstructorFieldInitializer
-                fieldName: SimpleIdentifier
-                  token: foo @49
-                  staticElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
-                  staticType: null
-                equals: = @53
-                expression: IntegerLiteral
-                  literal: 0 @55
-                  staticType: int
-        augmented
-          fields
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            const @43
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+              constantInitializers
+                ConstructorFieldInitializer
+                  fieldName: SimpleIdentifier
+                    token: foo @49
+                    staticElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
+                    staticType: null
+                  equals: = @53
+                  expression: IntegerLiteral
+                    literal: 0 @55
+                    staticType: int
+          augmented
             fields
-              final foo @59
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                type: int
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              synthetic get foo @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: int
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          fields
+            final foo @59
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              type: int
+          accessors
+            synthetic get foo @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: int
 ''');
   }
 
@@ -2763,46 +2797,47 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          foo @39
-            reference: <testLibraryFragment>::@class::A::@constructor::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            periodOffset: 38
-            nameEnd: 42
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::foo
-          accessors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            foo @39
+              reference: <testLibraryFragment>::@class::A::@constructor::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              periodOffset: 38
+              nameEnd: 42
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::foo
             accessors
-              augment get foo @65
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: int
-                id: getter_0
-                variable: <null>
-                augmentationTargetAny: <testLibraryFragment>::@class::A::@constructor::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          accessors
+            augment get foo @65
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: int
+              id: getter_0
+              variable: <null>
+              augmentationTargetAny: <testLibraryFragment>::@class::A::@constructor::foo
 ''');
   }
 
@@ -2825,51 +2860,52 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        methods
-          foo @42
-            reference: <testLibraryFragment>::@class::A::@method::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: void
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
-          methods
-            <testLibraryFragment>::@class::A::@method::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          methods
+            foo @42
+              reference: <testLibraryFragment>::@class::A::@method::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: void
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              augment get foo @65
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: int
-                id: getter_0
-                variable: <null>
-                augmentationTargetAny: <testLibraryFragment>::@class::A::@method::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+            methods
+              <testLibraryFragment>::@class::A::@method::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          accessors
+            augment get foo @65
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: int
+              id: getter_0
+              variable: <null>
+              augmentationTargetAny: <testLibraryFragment>::@class::A::@method::foo
 ''');
   }
 
@@ -2892,64 +2928,65 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          synthetic foo @-1
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            id: field_0
-            setter: setter_0
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          set foo= @41
-            reference: <testLibraryFragment>::@class::A::@setter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional _ @49
-                type: int
-            returnType: void
-            id: setter_0
-            variable: field_0
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
-            <testLibraryFragment>::@class::A::@setter::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            synthetic foo @-1
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              id: field_0
+              setter: setter_0
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            set foo= @41
+              reference: <testLibraryFragment>::@class::A::@setter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional _ @49
+                  type: int
+              returnType: void
+              id: setter_0
+              variable: field_0
+          augmented
+            fields
+              <testLibraryFragment>::@class::A::@field::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              augment get foo @65
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: int
-                id: getter_0
-                variable: <null>
-                augmentationTargetAny: <testLibraryFragment>::@class::A::@setter::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+              <testLibraryFragment>::@class::A::@setter::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          accessors
+            augment get foo @65
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: int
+              id: getter_0
+              variable: <null>
+              augmentationTargetAny: <testLibraryFragment>::@class::A::@setter::foo
 ''');
   }
 
@@ -2972,68 +3009,69 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          synthetic foo1 @-1
-            reference: <testLibraryFragment>::@class::A::@field::foo1
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            id: field_0
-            getter: getter_0
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          get foo1 @45
-            reference: <testLibraryFragment>::@class::A::@getter::foo1
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-            id: getter_0
-            variable: field_0
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::foo1
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo2
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibraryFragment>::@class::A::@getter::foo1
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo2
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            synthetic foo1 @-1
+              reference: <testLibraryFragment>::@class::A::@field::foo1
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              id: field_0
+              getter: getter_0
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            get foo1 @45
+              reference: <testLibraryFragment>::@class::A::@getter::foo1
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+              id: getter_0
+              variable: field_0
+          augmented
             fields
-              synthetic foo2 @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo2
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                type: int
-                id: field_1
-                getter: getter_1
+              <testLibraryFragment>::@class::A::@field::foo1
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo2
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              get foo2 @57
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo2
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: int
-                id: getter_1
-                variable: field_1
+              <testLibraryFragment>::@class::A::@getter::foo1
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo2
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          fields
+            synthetic foo2 @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo2
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              type: int
+              id: field_1
+              getter: getter_1
+          accessors
+            get foo2 @57
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo2
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: int
+              id: getter_1
+              variable: field_1
 ''');
   }
 
@@ -3056,78 +3094,79 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        typeParameters
-          covariant T1 @33
-            defaultType: dynamic
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          synthetic foo1 @-1
-            reference: <testLibraryFragment>::@class::A::@field::foo1
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: T1
-            id: field_0
-            getter: getter_0
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          abstract get foo1 @48
-            reference: <testLibraryFragment>::@class::A::@getter::foo1
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: T1
-            id: getter_0
-            variable: field_0
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::foo1
-            FieldMember
-              base: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo2
-              augmentationSubstitution: {T2: T1}
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibraryFragment>::@class::A::@getter::foo1
-            PropertyAccessorMember
-              base: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo2
-              augmentationSubstitution: {T2: T1}
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            typeParameters
-              covariant T2 @45
-                defaultType: dynamic
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          typeParameters
+            covariant T1 @33
+              defaultType: dynamic
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            synthetic foo1 @-1
+              reference: <testLibraryFragment>::@class::A::@field::foo1
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: T1
+              id: field_0
+              getter: getter_0
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            abstract get foo1 @48
+              reference: <testLibraryFragment>::@class::A::@getter::foo1
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: T1
+              id: getter_0
+              variable: field_0
+          augmented
             fields
-              synthetic foo2 @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo2
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                type: T2
-                id: field_1
-                getter: getter_1
+              <testLibraryFragment>::@class::A::@field::foo1
+              FieldMember
+                base: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo2
+                augmentationSubstitution: {T2: T1}
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              abstract get foo2 @60
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo2
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: T2
-                id: getter_1
-                variable: field_1
+              <testLibraryFragment>::@class::A::@getter::foo1
+              PropertyAccessorMember
+                base: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo2
+                augmentationSubstitution: {T2: T1}
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          typeParameters
+            covariant T2 @45
+              defaultType: dynamic
+          augmentationTarget: <testLibraryFragment>::@class::A
+          fields
+            synthetic foo2 @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo2
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              type: T2
+              id: field_1
+              getter: getter_1
+          accessors
+            abstract get foo2 @60
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getter::foo2
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: T2
+              id: getter_1
+              variable: field_1
 ''');
   }
 
@@ -3150,73 +3189,74 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          foo @41
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            shouldUseTypeForInitializerInference: true
-            id: field_0
-            getter: getter_0
-            setter: setter_0
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          synthetic get foo @-1
-            reference: <testLibraryFragment>::@class::A::@getter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-            id: getter_0
-            variable: field_0
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
-          synthetic set foo= @-1
-            reference: <testLibraryFragment>::@class::A::@setter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional _foo @-1
-                type: int
-            returnType: void
-            id: setter_0
-            variable: field_0
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
-            <testLibraryFragment>::@class::A::@setter::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            foo @41
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              id: field_0
+              getter: getter_0
+              setter: setter_0
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            synthetic get foo @-1
+              reference: <testLibraryFragment>::@class::A::@getter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+              id: getter_0
+              variable: field_0
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+            synthetic set foo= @-1
+              reference: <testLibraryFragment>::@class::A::@setter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional _foo @-1
+                  type: int
+              returnType: void
+              id: setter_0
+              variable: field_0
+          augmented
+            fields
+              <testLibraryFragment>::@class::A::@field::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              augment get foo @65
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: int
-                id: getter_1
-                variable: field_0
-                augmentationTarget: <testLibraryFragment>::@class::A::@getter::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+              <testLibraryFragment>::@class::A::@setter::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          accessors
+            augment get foo @65
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: int
+              id: getter_1
+              variable: field_0
+              augmentationTarget: <testLibraryFragment>::@class::A::@getter::foo
 ''');
   }
 
@@ -3247,95 +3287,96 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @56
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          foo @66
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            shouldUseTypeForInitializerInference: true
-            id: field_0
-            getter: getter_0
-            setter: setter_0
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          synthetic get foo @-1
-            reference: <testLibraryFragment>::@class::A::@getter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-            id: getter_0
-            variable: field_0
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
-          synthetic set foo= @-1
-            reference: <testLibraryFragment>::@class::A::@setter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional _foo @-1
-                type: int
-            returnType: void
-            id: setter_0
-            variable: field_0
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@getterAugmentation::foo
-            <testLibraryFragment>::@class::A::@setter::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
-            augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-            accessors
-              augment get foo @65
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: int
-                id: getter_1
-                variable: field_0
-                augmentationTarget: <testLibraryFragment>::@class::A::@getter::foo
-                augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@getterAugmentation::foo
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
     package:test/b.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @56
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            foo @66
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              id: field_0
+              getter: getter_0
+              setter: setter_0
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            synthetic get foo @-1
+              reference: <testLibraryFragment>::@class::A::@getter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+              id: getter_0
+              variable: field_0
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+            synthetic set foo= @-1
+              reference: <testLibraryFragment>::@class::A::@setter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional _foo @-1
+                  type: int
+              returnType: void
+              id: setter_0
+              variable: field_0
+          augmented
+            fields
+              <testLibraryFragment>::@class::A::@field::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              augment get foo @65
-                reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@getterAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-                returnType: int
-                id: getter_2
-                variable: field_0
-                augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+              <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@getterAugmentation::foo
+              <testLibraryFragment>::@class::A::@setter::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          accessors
+            augment get foo @65
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: int
+              id: getter_1
+              variable: field_0
+              augmentationTarget: <testLibraryFragment>::@class::A::@getter::foo
+              augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@getterAugmentation::foo
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          accessors
+            augment get foo @65
+              reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@getterAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+              returnType: int
+              id: getter_2
+              variable: field_0
+              augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
 ''');
   }
 
@@ -3359,75 +3400,76 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          synthetic foo1 @-1
-            reference: <testLibraryFragment>::@class::A::@field::foo1
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            id: field_0
-            getter: getter_0
-          synthetic foo2 @-1
-            reference: <testLibraryFragment>::@class::A::@field::foo2
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            id: field_1
-            getter: getter_1
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          get foo1 @45
-            reference: <testLibraryFragment>::@class::A::@getter::foo1
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-            id: getter_0
-            variable: field_0
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo1
-          get foo2 @66
-            reference: <testLibraryFragment>::@class::A::@getter::foo2
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-            id: getter_1
-            variable: field_1
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::foo1
-            <testLibraryFragment>::@class::A::@field::foo2
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo1
-            <testLibraryFragment>::@class::A::@getter::foo2
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            synthetic foo1 @-1
+              reference: <testLibraryFragment>::@class::A::@field::foo1
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              id: field_0
+              getter: getter_0
+            synthetic foo2 @-1
+              reference: <testLibraryFragment>::@class::A::@field::foo2
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              id: field_1
+              getter: getter_1
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            get foo1 @45
+              reference: <testLibraryFragment>::@class::A::@getter::foo1
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+              id: getter_0
+              variable: field_0
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo1
+            get foo2 @66
+              reference: <testLibraryFragment>::@class::A::@getter::foo2
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+              id: getter_1
+              variable: field_1
+          augmented
+            fields
+              <testLibraryFragment>::@class::A::@field::foo1
+              <testLibraryFragment>::@class::A::@field::foo2
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              augment get foo1 @65
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo1
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: int
-                id: getter_2
-                variable: field_0
-                augmentationTarget: <testLibraryFragment>::@class::A::@getter::foo1
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo1
+              <testLibraryFragment>::@class::A::@getter::foo2
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          accessors
+            augment get foo1 @65
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo1
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: int
+              id: getter_2
+              variable: field_0
+              augmentationTarget: <testLibraryFragment>::@class::A::@getter::foo1
 ''');
   }
 
@@ -3451,69 +3493,70 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          synthetic foo @-1
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            id: field_0
-            getter: getter_0
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          get foo @45
-            reference: <testLibraryFragment>::@class::A::@getter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-            id: getter_0
-            variable: field_0
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo::@def::0
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo::@def::1
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            synthetic foo @-1
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              id: field_0
+              getter: getter_0
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            get foo @45
+              reference: <testLibraryFragment>::@class::A::@getter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+              id: getter_0
+              variable: field_0
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo::@def::0
+          augmented
+            fields
+              <testLibraryFragment>::@class::A::@field::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              augment get foo @65
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo::@def::0
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: int
-                id: getter_1
-                variable: field_0
-                augmentationTarget: <testLibraryFragment>::@class::A::@getter::foo
-                augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo::@def::1
-              augment get foo @93
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo::@def::1
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: int
-                id: getter_2
-                variable: field_0
-                augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo::@def::0
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo::@def::1
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          accessors
+            augment get foo @65
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo::@def::0
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: int
+              id: getter_1
+              variable: field_0
+              augmentationTarget: <testLibraryFragment>::@class::A::@getter::foo
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo::@def::1
+            augment get foo @93
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo::@def::1
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: int
+              id: getter_2
+              variable: field_0
+              augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo::@def::0
 ''');
   }
 
@@ -3544,83 +3587,84 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @56
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          synthetic foo @-1
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            id: field_0
-            getter: getter_0
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          get foo @70
-            reference: <testLibraryFragment>::@class::A::@getter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-            id: getter_0
-            variable: field_0
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@getterAugmentation::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
-            augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-            accessors
-              augment get foo @65
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: int
-                id: getter_1
-                variable: field_0
-                augmentationTarget: <testLibraryFragment>::@class::A::@getter::foo
-                augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@getterAugmentation::foo
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
     package:test/b.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @56
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            synthetic foo @-1
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              id: field_0
+              getter: getter_0
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            get foo @70
+              reference: <testLibraryFragment>::@class::A::@getter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+              id: getter_0
+              variable: field_0
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+          augmented
+            fields
+              <testLibraryFragment>::@class::A::@field::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              augment get foo @65
-                reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@getterAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-                returnType: int
-                id: getter_2
-                variable: field_0
-                augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+              <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@getterAugmentation::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          accessors
+            augment get foo @65
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: int
+              id: getter_1
+              variable: field_0
+              augmentationTarget: <testLibraryFragment>::@class::A::@getter::foo
+              augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@getterAugmentation::foo
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          accessors
+            augment get foo @65
+              reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@getterAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+              returnType: int
+              id: getter_2
+              variable: field_0
+              augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
 ''');
   }
 
@@ -3643,37 +3687,38 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        augmented
-          accessors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          augmented
             accessors
-              augment get foo @65
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: int
-                id: getter_0
-                variable: <null>
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          accessors
+            augment get foo @65
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: int
+              id: getter_0
+              variable: <null>
 ''');
   }
 
@@ -3693,55 +3738,56 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        interfaces
-          I1
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
-          interfaces
-            I1
-            I2
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-      class I1 @56
-        reference: <testLibraryFragment>::@class::I1
-        enclosingElement: <testLibraryFragment>
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::I1::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::I1
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          interfaces
+            I1
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
             interfaces
+              I1
               I2
-          class I2 @68
-            reference: <testLibrary>::@fragment::package:test/a.dart::@class::I2
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
             constructors
-              synthetic @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@class::I2::@constructor::new
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::I2
+              <testLibraryFragment>::@class::A::@constructor::new
+        class I1 @56
+          reference: <testLibraryFragment>::@class::I1
+          enclosingElement: <testLibraryFragment>
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::I1::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::I1
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          interfaces
+            I2
+        class I2 @68
+          reference: <testLibrary>::@fragment::package:test/a.dart::@class::I2
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          constructors
+            synthetic @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@class::I2::@constructor::new
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::I2
 ''');
   }
 
@@ -3768,79 +3814,80 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        interfaces
-          I1
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
-          interfaces
-            I1
-            I2
-            I3
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-      class I1 @56
-        reference: <testLibraryFragment>::@class::I1
-        enclosingElement: <testLibraryFragment>
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::I1::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::I1
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @68
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
-            augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-            interfaces
-              I2
-          class I2 @93
-            reference: <testLibrary>::@fragment::package:test/a.dart::@class::I2
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            constructors
-              synthetic @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@class::I2::@constructor::new
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::I2
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
       augmentationImports
         package:test/b.dart
           enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
           reference: <testLibrary>::@augmentation::package:test/b.dart
-          definingUnit
-            reference: <testLibrary>::@fragment::package:test/b.dart
-            enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-            enclosingElement3: <testLibrary>::@fragment::package:test/a.dart
-            classes
-              augment class A @40
-                reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-                enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-                augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                interfaces
-                  I3
-              class I3 @65
-                reference: <testLibrary>::@fragment::package:test/b.dart::@class::I3
-                enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-                constructors
-                  synthetic @-1
-                    reference: <testLibrary>::@fragment::package:test/b.dart::@class::I3::@constructor::new
-                    enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@class::I3
+          definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          interfaces
+            I1
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
+            interfaces
+              I1
+              I2
+              I3
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+        class I1 @56
+          reference: <testLibraryFragment>::@class::I1
+          enclosingElement: <testLibraryFragment>
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::I1::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::I1
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @68
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          interfaces
+            I2
+        class I2 @93
+          reference: <testLibrary>::@fragment::package:test/a.dart::@class::I2
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          constructors
+            synthetic @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@class::I2::@constructor::new
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::I2
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibrary>::@fragment::package:test/a.dart
+      classes
+        augment class A @40
+          reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          interfaces
+            I3
+        class I3 @65
+          reference: <testLibrary>::@fragment::package:test/b.dart::@class::I3
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          constructors
+            synthetic @-1
+              reference: <testLibrary>::@fragment::package:test/b.dart::@class::I3::@constructor::new
+              enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@class::I3
 ''');
   }
 
@@ -3860,64 +3907,65 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        typeParameters
-          covariant T @33
-            defaultType: dynamic
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        interfaces
-          I1
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
-          interfaces
-            I1
-            I2<T>
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-      class I1 @59
-        reference: <testLibraryFragment>::@class::I1
-        enclosingElement: <testLibraryFragment>
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::I1::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::I1
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            typeParameters
-              covariant T2 @45
-                defaultType: dynamic
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          typeParameters
+            covariant T @33
+              defaultType: dynamic
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          interfaces
+            I1
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
             interfaces
-              I2<T2>
-          class I2 @76
-            reference: <testLibrary>::@fragment::package:test/a.dart::@class::I2
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            typeParameters
-              covariant E @79
-                defaultType: dynamic
+              I1
+              I2<T>
             constructors
-              synthetic @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@class::I2::@constructor::new
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::I2
+              <testLibraryFragment>::@class::A::@constructor::new
+        class I1 @59
+          reference: <testLibraryFragment>::@class::I1
+          enclosingElement: <testLibraryFragment>
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::I1::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::I1
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          typeParameters
+            covariant T2 @45
+              defaultType: dynamic
+          augmentationTarget: <testLibraryFragment>::@class::A
+          interfaces
+            I2<T2>
+        class I2 @76
+          reference: <testLibrary>::@fragment::package:test/a.dart::@class::I2
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          typeParameters
+            covariant E @79
+              defaultType: dynamic
+          constructors
+            synthetic @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@class::I2::@constructor::new
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::I2
 ''');
   }
 
@@ -3937,65 +3985,66 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        typeParameters
-          covariant T @33
-            defaultType: dynamic
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        interfaces
-          I1
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
-          interfaces
-            I1
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-      class I1 @59
-        reference: <testLibraryFragment>::@class::I1
-        enclosingElement: <testLibraryFragment>
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::I1::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::I1
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            typeParameters
-              covariant T2 @45
-                defaultType: dynamic
-              covariant T3 @49
-                defaultType: dynamic
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          typeParameters
+            covariant T @33
+              defaultType: dynamic
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          interfaces
+            I1
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
             interfaces
-              I2<T2>
-          class I2 @80
-            reference: <testLibrary>::@fragment::package:test/a.dart::@class::I2
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            typeParameters
-              covariant E @83
-                defaultType: dynamic
+              I1
             constructors
-              synthetic @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@class::I2::@constructor::new
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::I2
+              <testLibraryFragment>::@class::A::@constructor::new
+        class I1 @59
+          reference: <testLibraryFragment>::@class::I1
+          enclosingElement: <testLibraryFragment>
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::I1::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::I1
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          typeParameters
+            covariant T2 @45
+              defaultType: dynamic
+            covariant T3 @49
+              defaultType: dynamic
+          augmentationTarget: <testLibraryFragment>::@class::A
+          interfaces
+            I2<T2>
+        class I2 @80
+          reference: <testLibrary>::@fragment::package:test/a.dart::@class::I2
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          typeParameters
+            covariant E @83
+              defaultType: dynamic
+          constructors
+            synthetic @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@class::I2::@constructor::new
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::I2
 ''');
   }
 
@@ -4017,44 +4066,45 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          foo @39
-            reference: <testLibraryFragment>::@class::A::@constructor::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            periodOffset: 38
-            nameEnd: 42
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::foo
-          methods
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            foo @39
+              reference: <testLibraryFragment>::@class::A::@constructor::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              periodOffset: 38
+              nameEnd: 42
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::foo
             methods
-              augment foo @62
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: void
-                augmentationTargetAny: <testLibraryFragment>::@class::A::@constructor::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          methods
+            augment foo @62
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: void
+              augmentationTargetAny: <testLibraryFragment>::@class::A::@constructor::foo
 ''');
   }
 
@@ -4076,65 +4126,66 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          foo @41
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            shouldUseTypeForInitializerInference: true
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          synthetic get foo @-1
-            reference: <testLibraryFragment>::@class::A::@getter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-          synthetic set foo= @-1
-            reference: <testLibraryFragment>::@class::A::@setter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional _foo @-1
-                type: int
-            returnType: void
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibraryFragment>::@class::A::@getter::foo
-            <testLibraryFragment>::@class::A::@setter::foo
-          methods
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            foo @41
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            synthetic get foo @-1
+              reference: <testLibraryFragment>::@class::A::@getter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+            synthetic set foo= @-1
+              reference: <testLibraryFragment>::@class::A::@setter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional _foo @-1
+                  type: int
+              returnType: void
+          augmented
+            fields
+              <testLibraryFragment>::@class::A::@field::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+            accessors
+              <testLibraryFragment>::@class::A::@getter::foo
+              <testLibraryFragment>::@class::A::@setter::foo
             methods
-              augment foo @62
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: void
-                augmentationTargetAny: <testLibraryFragment>::@class::A::@getter::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          methods
+            augment foo @62
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: void
+              augmentationTargetAny: <testLibraryFragment>::@class::A::@getter::foo
 ''');
   }
 
@@ -4156,56 +4207,57 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          synthetic foo @-1
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          get foo @45
-            reference: <testLibraryFragment>::@class::A::@getter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibraryFragment>::@class::A::@getter::foo
-          methods
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            synthetic foo @-1
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            get foo @45
+              reference: <testLibraryFragment>::@class::A::@getter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+          augmented
+            fields
+              <testLibraryFragment>::@class::A::@field::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+            accessors
+              <testLibraryFragment>::@class::A::@getter::foo
             methods
-              augment foo @62
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: void
-                augmentationTargetAny: <testLibraryFragment>::@class::A::@getter::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          methods
+            augment foo @62
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: void
+              augmentationTargetAny: <testLibraryFragment>::@class::A::@getter::foo
 ''');
   }
 
@@ -4227,59 +4279,60 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          synthetic foo @-1
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          set foo= @41
-            reference: <testLibraryFragment>::@class::A::@setter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional _ @49
-                type: int
-            returnType: void
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibraryFragment>::@class::A::@setter::foo
-          methods
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            synthetic foo @-1
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            set foo= @41
+              reference: <testLibraryFragment>::@class::A::@setter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional _ @49
+                  type: int
+              returnType: void
+          augmented
+            fields
+              <testLibraryFragment>::@class::A::@field::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+            accessors
+              <testLibraryFragment>::@class::A::@setter::foo
             methods
-              augment foo @62
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: void
-                augmentationTargetAny: <testLibraryFragment>::@class::A::@setter::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          methods
+            augment foo @62
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: void
+              augmentationTargetAny: <testLibraryFragment>::@class::A::@setter::foo
 ''');
   }
 
@@ -4301,47 +4354,48 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        methods
-          foo @42
-            reference: <testLibraryFragment>::@class::A::@method::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: void
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          methods
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@method::bar
-            <testLibraryFragment>::@class::A::@method::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          methods
+            foo @42
+              reference: <testLibraryFragment>::@class::A::@method::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: void
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             methods
-              bar @54
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@method::bar
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: void
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@method::bar
+              <testLibraryFragment>::@class::A::@method::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          methods
+            bar @54
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@method::bar
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: void
 ''');
   }
 
@@ -4361,48 +4415,49 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          methods
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@method::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             methods
-              foo @54
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@method::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                parameters
-                  optionalPositional default x @63
-                    type: int
-                    constantInitializer
-                      IntegerLiteral
-                        literal: 42 @67
-                        staticType: int
-                returnType: void
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@method::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          methods
+            foo @54
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@method::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              parameters
+                optionalPositional default x @63
+                  type: int
+                  constantInitializer
+                    IntegerLiteral
+                      literal: 42 @67
+                      staticType: int
+              returnType: void
 ''');
   }
 
@@ -4425,53 +4480,54 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        methods
-          foo1 @42
-            reference: <testLibraryFragment>::@class::A::@method::foo1
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: void
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo1
-          foo2 @59
-            reference: <testLibraryFragment>::@class::A::@method::foo2
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: void
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          methods
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo1
-            <testLibraryFragment>::@class::A::@method::foo2
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          methods
+            foo1 @42
+              reference: <testLibraryFragment>::@class::A::@method::foo1
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: void
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo1
+            foo2 @59
+              reference: <testLibraryFragment>::@class::A::@method::foo2
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: void
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             methods
-              augment foo1 @62
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo1
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: void
-                augmentationTarget: <testLibraryFragment>::@class::A::@method::foo1
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo1
+              <testLibraryFragment>::@class::A::@method::foo2
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          methods
+            augment foo1 @62
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo1
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: void
+              augmentationTarget: <testLibraryFragment>::@class::A::@method::foo1
 ''');
   }
 
@@ -4494,54 +4550,55 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        methods
-          foo @42
-            reference: <testLibraryFragment>::@class::A::@method::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: void
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo::@def::0
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          methods
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo::@def::1
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          methods
+            foo @42
+              reference: <testLibraryFragment>::@class::A::@method::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: void
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo::@def::0
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             methods
-              augment foo @62
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo::@def::0
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: void
-                augmentationTarget: <testLibraryFragment>::@class::A::@method::foo
-                augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo::@def::1
-              augment foo @86
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo::@def::1
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: void
-                augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo::@def::0
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo::@def::1
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          methods
+            augment foo @62
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo::@def::0
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: void
+              augmentationTarget: <testLibraryFragment>::@class::A::@method::foo
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo::@def::1
+            augment foo @86
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo::@def::1
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: void
+              augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo::@def::0
 ''');
   }
 
@@ -4566,60 +4623,61 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        methods
-          foo @42
-            reference: <testLibraryFragment>::@class::A::@method::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: void
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0::@methodAugmentation::foo
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          methods
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1::@methodAugmentation::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          methods
+            foo @42
+              reference: <testLibraryFragment>::@class::A::@method::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: void
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0::@methodAugmentation::foo
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             methods
-              augment foo @62
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0::@methodAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0
-                returnType: void
-                augmentationTarget: <testLibraryFragment>::@class::A::@method::foo
-                augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1::@methodAugmentation::foo
-          augment class A @87
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0
-            methods
-              augment foo @106
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1::@methodAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1
-                returnType: void
-                augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0::@methodAugmentation::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1::@methodAugmentation::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1
+          methods
+            augment foo @62
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0::@methodAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0
+              returnType: void
+              augmentationTarget: <testLibraryFragment>::@class::A::@method::foo
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1::@methodAugmentation::foo
+        augment class A @87
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0
+          methods
+            augment foo @106
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1::@methodAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::1
+              returnType: void
+              augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@def::0::@methodAugmentation::foo
 ''');
   }
 
@@ -4649,69 +4707,70 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        methods
-          foo @42
-            reference: <testLibraryFragment>::@class::A::@method::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: void
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          methods
-            <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@methodAugmentation::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @68
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
-            augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-            methods
-              augment foo @87
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: void
-                augmentationTarget: <testLibraryFragment>::@class::A::@method::foo
-                augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@methodAugmentation::foo
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
       augmentationImports
         package:test/b.dart
           enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
           reference: <testLibrary>::@augmentation::package:test/b.dart
-          definingUnit
-            reference: <testLibrary>::@fragment::package:test/b.dart
-            enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-            enclosingElement3: <testLibrary>::@fragment::package:test/a.dart
-            classes
-              augment class A @40
-                reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-                enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-                augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                methods
-                  augment foo @59
-                    reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@methodAugmentation::foo
-                    enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-                    returnType: void
-                    augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
+          definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          methods
+            foo @42
+              reference: <testLibraryFragment>::@class::A::@method::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: void
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+            methods
+              <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@methodAugmentation::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @68
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          methods
+            augment foo @87
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: void
+              augmentationTarget: <testLibraryFragment>::@class::A::@method::foo
+              augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@methodAugmentation::foo
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibrary>::@fragment::package:test/a.dart
+      classes
+        augment class A @40
+          reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          methods
+            augment foo @59
+              reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@methodAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+              returnType: void
+              augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
 ''');
   }
 
@@ -4733,55 +4792,56 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        typeParameters
-          covariant T @33
-            defaultType: dynamic
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        methods
-          foo @42
-            reference: <testLibraryFragment>::@class::A::@method::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: T
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          methods
-            MethodMember
-              base: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@method::bar
-              augmentationSubstitution: {T2: T}
-            <testLibraryFragment>::@class::A::@method::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            typeParameters
-              covariant T2 @45
-                defaultType: dynamic
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          typeParameters
+            covariant T @33
+              defaultType: dynamic
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          methods
+            foo @42
+              reference: <testLibraryFragment>::@class::A::@method::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: T
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             methods
-              bar @56
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@method::bar
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: T2
+              MethodMember
+                base: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@method::bar
+                augmentationSubstitution: {T2: T}
+              <testLibraryFragment>::@class::A::@method::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          typeParameters
+            covariant T2 @45
+              defaultType: dynamic
+          augmentationTarget: <testLibraryFragment>::@class::A
+          methods
+            bar @56
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@method::bar
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: T2
 ''');
   }
 
@@ -4803,56 +4863,57 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        typeParameters
-          covariant T @33
-            defaultType: dynamic
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        methods
-          foo @42
-            reference: <testLibraryFragment>::@class::A::@method::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: T
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          methods
-            MethodMember
-              base: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
-              augmentationSubstitution: {T2: T}
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            typeParameters
-              covariant T2 @45
-                defaultType: dynamic
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          typeParameters
+            covariant T @33
+              defaultType: dynamic
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          methods
+            foo @42
+              reference: <testLibraryFragment>::@class::A::@method::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: T
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             methods
-              augment foo @64
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: T2
-                augmentationTarget: <testLibraryFragment>::@class::A::@method::foo
+              MethodMember
+                base: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
+                augmentationSubstitution: {T2: T}
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          typeParameters
+            covariant T2 @45
+              defaultType: dynamic
+          augmentationTarget: <testLibraryFragment>::@class::A
+          methods
+            augment foo @64
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: T2
+              augmentationTarget: <testLibraryFragment>::@class::A::@method::foo
 ''');
   }
 
@@ -4872,54 +4933,55 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        supertype: Object
-        mixins
-          M1
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
-          mixins
-            M1
-            M2
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-    mixins
-      mixin M1 @50
-        reference: <testLibraryFragment>::@mixin::M1
-        enclosingElement: <testLibraryFragment>
-        superclassConstraints
-          Object
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          supertype: Object
+          mixins
+            M1
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
             mixins
+              M1
               M2
-        mixins
-          mixin M2 @62
-            reference: <testLibrary>::@fragment::package:test/a.dart::@mixin::M2
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            superclassConstraints
-              Object
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+      mixins
+        mixin M1 @50
+          reference: <testLibraryFragment>::@mixin::M1
+          enclosingElement: <testLibraryFragment>
+          superclassConstraints
+            Object
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          mixins
+            M2
+      mixins
+        mixin M2 @62
+          reference: <testLibrary>::@fragment::package:test/a.dart::@mixin::M2
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          superclassConstraints
+            Object
 ''');
   }
 
@@ -4947,107 +5009,108 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class B @56
-        reference: <testLibraryFragment>::@class::B
-        enclosingElement: <testLibraryFragment>
-        typeParameters
-          covariant S @58
-            defaultType: dynamic
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::B::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::B
-      class A @70
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        typeParameters
-          covariant T1 @72
-            defaultType: dynamic
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        supertype: B<T1>
-        mixins
-          M1<T1>
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-            superConstructor: ConstructorMember
-              base: <testLibraryFragment>::@class::B::@constructor::new
-              substitution: {S: T1}
-        augmented
-          mixins
-            M1<T1>
-            M2<T1>
-            M3<T1>
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-    mixins
-      mixin M1 @107
-        reference: <testLibraryFragment>::@mixin::M1
-        enclosingElement: <testLibraryFragment>
-        typeParameters
-          covariant U1 @110
-            defaultType: dynamic
-        superclassConstraints
-          B<U1>
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            typeParameters
-              covariant T2 @45
-                defaultType: dynamic
-            augmentationTarget: <testLibraryFragment>::@class::A
-            augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-            mixins
-              M2<T2>
-        mixins
-          mixin M2 @66
-            reference: <testLibrary>::@fragment::package:test/a.dart::@mixin::M2
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            typeParameters
-              covariant U2 @69
-                defaultType: dynamic
-            superclassConstraints
-              M1<U2>
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
     package:test/b.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            typeParameters
-              covariant T3 @45
-                defaultType: dynamic
-            augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class B @56
+          reference: <testLibraryFragment>::@class::B
+          enclosingElement: <testLibraryFragment>
+          typeParameters
+            covariant S @58
+              defaultType: dynamic
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::B::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::B
+        class A @70
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          typeParameters
+            covariant T1 @72
+              defaultType: dynamic
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          supertype: B<T1>
+          mixins
+            M1<T1>
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+              superConstructor: ConstructorMember
+                base: <testLibraryFragment>::@class::B::@constructor::new
+                substitution: {S: T1}
+          augmented
             mixins
-              M3<T3>
-        mixins
-          mixin M3 @66
-            reference: <testLibrary>::@fragment::package:test/b.dart::@mixin::M3
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            typeParameters
-              covariant U3 @69
-                defaultType: dynamic
-            superclassConstraints
-              M2<U3>
+              M1<T1>
+              M2<T1>
+              M3<T1>
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+      mixins
+        mixin M1 @107
+          reference: <testLibraryFragment>::@mixin::M1
+          enclosingElement: <testLibraryFragment>
+          typeParameters
+            covariant U1 @110
+              defaultType: dynamic
+          superclassConstraints
+            B<U1>
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          typeParameters
+            covariant T2 @45
+              defaultType: dynamic
+          augmentationTarget: <testLibraryFragment>::@class::A
+          augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          mixins
+            M2<T2>
+      mixins
+        mixin M2 @66
+          reference: <testLibrary>::@fragment::package:test/a.dart::@mixin::M2
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          typeParameters
+            covariant U2 @69
+              defaultType: dynamic
+          superclassConstraints
+            M1<U2>
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          typeParameters
+            covariant T3 @45
+              defaultType: dynamic
+          augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          mixins
+            M3<T3>
+      mixins
+        mixin M3 @66
+          reference: <testLibrary>::@fragment::package:test/b.dart::@mixin::M3
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          typeParameters
+            covariant U3 @69
+              defaultType: dynamic
+          superclassConstraints
+            M2<U3>
 ''');
   }
 
@@ -5070,49 +5133,50 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          foo @39
-            reference: <testLibraryFragment>::@class::A::@constructor::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            periodOffset: 38
-            nameEnd: 42
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::foo
-          accessors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            foo @39
+              reference: <testLibraryFragment>::@class::A::@constructor::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              periodOffset: 38
+              nameEnd: 42
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::foo
             accessors
-              augment set foo= @61
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                parameters
-                  requiredPositional _ @69
-                    type: int
-                returnType: void
-                id: setter_0
-                variable: <null>
-                augmentationTargetAny: <testLibraryFragment>::@class::A::@constructor::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          accessors
+            augment set foo= @61
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              parameters
+                requiredPositional _ @69
+                  type: int
+              returnType: void
+              id: setter_0
+              variable: <null>
+              augmentationTargetAny: <testLibraryFragment>::@class::A::@constructor::foo
 ''');
   }
 
@@ -5135,64 +5199,65 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          synthetic foo @-1
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            id: field_0
-            getter: getter_0
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          get foo @45
-            reference: <testLibraryFragment>::@class::A::@getter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-            id: getter_0
-            variable: field_0
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibraryFragment>::@class::A::@getter::foo
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            synthetic foo @-1
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              id: field_0
+              getter: getter_0
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            get foo @45
+              reference: <testLibraryFragment>::@class::A::@getter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+              id: getter_0
+              variable: field_0
+          augmented
+            fields
+              <testLibraryFragment>::@class::A::@field::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              augment set foo= @61
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                parameters
-                  requiredPositional _ @69
-                    type: int
-                returnType: void
-                id: setter_0
-                variable: <null>
-                augmentationTargetAny: <testLibraryFragment>::@class::A::@getter::foo
+              <testLibraryFragment>::@class::A::@getter::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          accessors
+            augment set foo= @61
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              parameters
+                requiredPositional _ @69
+                  type: int
+              returnType: void
+              id: setter_0
+              variable: <null>
+              augmentationTargetAny: <testLibraryFragment>::@class::A::@getter::foo
 ''');
   }
 
@@ -5215,54 +5280,55 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        methods
-          foo @42
-            reference: <testLibraryFragment>::@class::A::@method::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: void
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
-          methods
-            <testLibraryFragment>::@class::A::@method::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          methods
+            foo @42
+              reference: <testLibraryFragment>::@class::A::@method::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: void
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              augment set foo= @61
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                parameters
-                  requiredPositional _ @69
-                    type: int
-                returnType: void
-                id: setter_0
-                variable: <null>
-                augmentationTargetAny: <testLibraryFragment>::@class::A::@method::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
+            methods
+              <testLibraryFragment>::@class::A::@method::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          accessors
+            augment set foo= @61
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              parameters
+                requiredPositional _ @69
+                  type: int
+              returnType: void
+              id: setter_0
+              variable: <null>
+              augmentationTargetAny: <testLibraryFragment>::@class::A::@method::foo
 ''');
   }
 
@@ -5285,74 +5351,75 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          synthetic foo1 @-1
-            reference: <testLibraryFragment>::@class::A::@field::foo1
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            id: field_0
-            setter: setter_0
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          set foo1= @41
-            reference: <testLibraryFragment>::@class::A::@setter::foo1
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional _ @50
-                type: int
-            returnType: void
-            id: setter_0
-            variable: field_0
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::foo1
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo2
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibraryFragment>::@class::A::@setter::foo1
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setter::foo2
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            synthetic foo1 @-1
+              reference: <testLibraryFragment>::@class::A::@field::foo1
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              id: field_0
+              setter: setter_0
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            set foo1= @41
+              reference: <testLibraryFragment>::@class::A::@setter::foo1
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional _ @50
+                  type: int
+              returnType: void
+              id: setter_0
+              variable: field_0
+          augmented
             fields
-              synthetic foo2 @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo2
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                type: int
-                id: field_1
-                setter: setter_1
+              <testLibraryFragment>::@class::A::@field::foo1
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo2
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              set foo2= @53
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setter::foo2
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                parameters
-                  requiredPositional _ @62
-                    type: int
-                returnType: void
-                id: setter_1
-                variable: field_1
+              <testLibraryFragment>::@class::A::@setter::foo1
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setter::foo2
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          fields
+            synthetic foo2 @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@field::foo2
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              type: int
+              id: field_1
+              setter: setter_1
+          accessors
+            set foo2= @53
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setter::foo2
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              parameters
+                requiredPositional _ @62
+                  type: int
+              returnType: void
+              id: setter_1
+              variable: field_1
 ''');
   }
 
@@ -5375,76 +5442,77 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          foo @41
-            reference: <testLibraryFragment>::@class::A::@field::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            shouldUseTypeForInitializerInference: true
-            id: field_0
-            getter: getter_0
-            setter: setter_0
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          synthetic get foo @-1
-            reference: <testLibraryFragment>::@class::A::@getter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: int
-            id: getter_0
-            variable: field_0
-          synthetic set foo= @-1
-            reference: <testLibraryFragment>::@class::A::@setter::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional _foo @-1
-                type: int
-            returnType: void
-            id: setter_0
-            variable: field_0
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::foo
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibraryFragment>::@class::A::@getter::foo
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            foo @41
+              reference: <testLibraryFragment>::@class::A::@field::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              shouldUseTypeForInitializerInference: true
+              id: field_0
+              getter: getter_0
+              setter: setter_0
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            synthetic get foo @-1
+              reference: <testLibraryFragment>::@class::A::@getter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: int
+              id: getter_0
+              variable: field_0
+            synthetic set foo= @-1
+              reference: <testLibraryFragment>::@class::A::@setter::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional _foo @-1
+                  type: int
+              returnType: void
+              id: setter_0
+              variable: field_0
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
+          augmented
+            fields
+              <testLibraryFragment>::@class::A::@field::foo
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              augment set foo= @61
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                parameters
-                  requiredPositional _ @69
-                    type: int
-                returnType: void
-                id: setter_1
-                variable: field_0
-                augmentationTarget: <testLibraryFragment>::@class::A::@setter::foo
+              <testLibraryFragment>::@class::A::@getter::foo
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          accessors
+            augment set foo= @61
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              parameters
+                requiredPositional _ @69
+                  type: int
+              returnType: void
+              id: setter_1
+              variable: field_0
+              augmentationTarget: <testLibraryFragment>::@class::A::@setter::foo
 ''');
   }
 
@@ -5467,40 +5535,41 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        augmented
-          accessors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          augmented
             accessors
-              augment set foo= @61
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                parameters
-                  requiredPositional _ @69
-                    type: int
-                returnType: void
-                id: setter_0
-                variable: <null>
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          accessors
+            augment set foo= @61
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              parameters
+                requiredPositional _ @69
+                  type: int
+              returnType: void
+              id: setter_0
+              variable: <null>
 ''');
   }
 
@@ -5524,84 +5593,85 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        fields
-          synthetic foo1 @-1
-            reference: <testLibraryFragment>::@class::A::@field::foo1
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            id: field_0
-            setter: setter_0
-          synthetic foo2 @-1
-            reference: <testLibraryFragment>::@class::A::@field::foo2
-            enclosingElement: <testLibraryFragment>::@class::A
-            type: int
-            id: field_1
-            setter: setter_1
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        accessors
-          set foo1= @41
-            reference: <testLibraryFragment>::@class::A::@setter::foo1
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional _ @50
-                type: int
-            returnType: void
-            id: setter_0
-            variable: field_0
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo1
-          set foo2= @62
-            reference: <testLibraryFragment>::@class::A::@setter::foo2
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional _ @71
-                type: int
-            returnType: void
-            id: setter_1
-            variable: field_1
-        augmented
-          fields
-            <testLibraryFragment>::@class::A::@field::foo1
-            <testLibraryFragment>::@class::A::@field::foo2
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-          accessors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo1
-            <testLibraryFragment>::@class::A::@setter::foo2
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          fields
+            synthetic foo1 @-1
+              reference: <testLibraryFragment>::@class::A::@field::foo1
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              id: field_0
+              setter: setter_0
+            synthetic foo2 @-1
+              reference: <testLibraryFragment>::@class::A::@field::foo2
+              enclosingElement: <testLibraryFragment>::@class::A
+              type: int
+              id: field_1
+              setter: setter_1
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          accessors
+            set foo1= @41
+              reference: <testLibraryFragment>::@class::A::@setter::foo1
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional _ @50
+                  type: int
+              returnType: void
+              id: setter_0
+              variable: field_0
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo1
+            set foo2= @62
+              reference: <testLibraryFragment>::@class::A::@setter::foo2
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional _ @71
+                  type: int
+              returnType: void
+              id: setter_1
+              variable: field_1
+          augmented
+            fields
+              <testLibraryFragment>::@class::A::@field::foo1
+              <testLibraryFragment>::@class::A::@field::foo2
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
             accessors
-              augment set foo1= @61
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo1
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                parameters
-                  requiredPositional _ @70
-                    type: int
-                returnType: void
-                id: setter_2
-                variable: field_0
-                augmentationTarget: <testLibraryFragment>::@class::A::@setter::foo1
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo1
+              <testLibraryFragment>::@class::A::@setter::foo2
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          accessors
+            augment set foo1= @61
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo1
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              parameters
+                requiredPositional _ @70
+                  type: int
+              returnType: void
+              id: setter_2
+              variable: field_0
+              augmentationTarget: <testLibraryFragment>::@class::A::@setter::foo1
 ''');
   }
 
@@ -5629,46 +5699,47 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @57
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        mixins
-          augment mixin A @44
-            reference: <testLibrary>::@fragment::package:test/a.dart::@mixinAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTargetAny: <testLibraryFragment>::@class::A
-            superclassConstraints
-              Object
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
     package:test/b.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        mixins
-          augment mixin A @44
-            reference: <testLibrary>::@fragment::package:test/b.dart::@mixinAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            augmentationTargetAny: <testLibraryFragment>::@class::A
-            superclassConstraints
-              Object
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @57
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      mixins
+        augment mixin A @44
+          reference: <testLibrary>::@fragment::package:test/a.dart::@mixinAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTargetAny: <testLibraryFragment>::@class::A
+          superclassConstraints
+            Object
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      mixins
+        augment mixin A @44
+          reference: <testLibrary>::@fragment::package:test/b.dart::@mixinAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          augmentationTargetAny: <testLibraryFragment>::@class::A
+          superclassConstraints
+            Object
 ''');
   }
 
@@ -5697,46 +5768,47 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @57
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        mixins
-          augment mixin A @44
-            reference: <testLibrary>::@fragment::package:test/a.dart::@mixinAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTargetAny: <testLibraryFragment>::@class::A
-            superclassConstraints
-              Object
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
     package:test/b.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @44
-            reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @57
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      mixins
+        augment mixin A @44
+          reference: <testLibrary>::@fragment::package:test/a.dart::@mixinAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTargetAny: <testLibraryFragment>::@class::A
+          superclassConstraints
+            Object
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @44
+          reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
 ''');
   }
 
@@ -5766,65 +5838,66 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @56
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          named @64
-            reference: <testLibraryFragment>::@class::A::@constructor::named
-            enclosingElement: <testLibraryFragment>::@class::A
-            periodOffset: 63
-            nameEnd: 69
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::named
-        augmented
-          constructors
-            <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@constructorAugmentation::named
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
-            augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-            constructors
-              augment named @59
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::named
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                periodOffset: 58
-                nameEnd: 64
-                augmentationTarget: <testLibraryFragment>::@class::A::@constructor::named
-                augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@constructorAugmentation::named
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
     package:test/b.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @56
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            named @64
+              reference: <testLibraryFragment>::@class::A::@constructor::named
+              enclosingElement: <testLibraryFragment>::@class::A
+              periodOffset: 63
+              nameEnd: 69
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::named
+          augmented
             constructors
-              augment named @59
-                reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@constructorAugmentation::named
-                enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
-                periodOffset: 58
-                nameEnd: 64
-                augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::named
+              <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@constructorAugmentation::named
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          constructors
+            augment named @59
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::named
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              periodOffset: 58
+              nameEnd: 64
+              augmentationTarget: <testLibraryFragment>::@class::A::@constructor::named
+              augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@constructorAugmentation::named
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            augment named @59
+              reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A::@constructorAugmentation::named
+              enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::A
+              periodOffset: 58
+              nameEnd: 64
+              augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::named
 ''');
   }
 
@@ -5846,44 +5919,45 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          named @39
-            reference: <testLibraryFragment>::@class::A::@constructor::named
-            enclosingElement: <testLibraryFragment>::@class::A
-            periodOffset: 38
-            nameEnd: 44
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::named
-        augmented
-          constructors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::named
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            named @39
+              reference: <testLibraryFragment>::@class::A::@constructor::named
+              enclosingElement: <testLibraryFragment>::@class::A
+              periodOffset: 38
+              nameEnd: 44
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::named
+          augmented
             constructors
-              augment named @59
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::named
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                periodOffset: 58
-                nameEnd: 64
-                augmentationTarget: <testLibraryFragment>::@class::A::@constructor::named
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::named
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          constructors
+            augment named @59
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::named
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              periodOffset: 58
+              nameEnd: 64
+              augmentationTarget: <testLibraryFragment>::@class::A::@constructor::named
 ''');
   }
 
@@ -5905,40 +5979,41 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          @37
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::new
-        augmented
-          constructors
-            <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::new
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            @37
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::new
+          augmented
             constructors
-              augment @57
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::new
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                augmentationTarget: <testLibraryFragment>::@class::A::@constructor::new
+              <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::new
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
+          constructors
+            augment @57
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::new
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              augmentationTarget: <testLibraryFragment>::@class::A::@constructor::new
 ''');
   }
 
@@ -5970,50 +6045,51 @@
     package:test/a.dart
       enclosingElement: <testLibrary>
       enclosingElement3: <testLibraryFragment>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    libraryImports
-      package:test/a.dart
-        enclosingElement: <testLibrary>
-        enclosingElement3: <testLibraryFragment>
-    classes
-      class B @49
-        reference: <testLibraryFragment>::@class::B
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B
-        supertype: A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::B::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::B
-            superConstructor: package:test/a.dart::<fragment>::@class::A::@constructor::new
-        augmented
-          constructors
-            <testLibraryFragment>::@class::B::@constructor::new
-          methods
-            <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B::@method::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/b.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class B @43
-            reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            augmentationTarget: <testLibraryFragment>::@class::B
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      libraryImports
+        package:test/a.dart
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibraryFragment>
+      classes
+        class B @49
+          reference: <testLibraryFragment>::@class::B
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B
+          supertype: A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::B::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::B
+              superConstructor: package:test/a.dart::<fragment>::@class::A::@constructor::new
+          augmented
+            constructors
+              <testLibraryFragment>::@class::B::@constructor::new
             methods
-              foo @49
-                reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B::@method::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B
-                parameters
-                  requiredPositional a @53
-                    type: String
-                returnType: int
+              <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B::@method::foo
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class B @43
+          reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          augmentationTarget: <testLibraryFragment>::@class::B
+          methods
+            foo @49
+              reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B::@method::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B
+              parameters
+                requiredPositional a @53
+                  type: String
+              returnType: int
 ''');
   }
 
@@ -6041,33 +6117,7 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class B @32
-        reference: <testLibraryFragment>::@class::B
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::B::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::B
-        methods
-          foo @38
-            reference: <testLibraryFragment>::@class::B::@method::foo
-            enclosingElement: <testLibraryFragment>::@class::B
-            parameters
-              requiredPositional a @42
-                type: String
-            returnType: int
-        augmented
-          interfaces
-            A
-          constructors
-            <testLibraryFragment>::@class::B::@constructor::new
-          methods
-            <testLibraryFragment>::@class::B::@method::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/b.dart
       enclosingElement: <testLibrary>
@@ -6076,21 +6126,48 @@
         package:test/a.dart
           enclosingElement: <testLibrary>
           enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        libraryImports
-          package:test/a.dart
-            enclosingElement: <testLibrary>
-            enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-        classes
-          augment class B @60
-            reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            augmentationTarget: <testLibraryFragment>::@class::B
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class B @32
+          reference: <testLibraryFragment>::@class::B
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::B::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::B
+          methods
+            foo @38
+              reference: <testLibraryFragment>::@class::B::@method::foo
+              enclosingElement: <testLibraryFragment>::@class::B
+              parameters
+                requiredPositional a @42
+                  type: String
+              returnType: int
+          augmented
             interfaces
               A
+            constructors
+              <testLibraryFragment>::@class::B::@constructor::new
+            methods
+              <testLibraryFragment>::@class::B::@method::foo
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      libraryImports
+        package:test/a.dart
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
+      classes
+        augment class B @60
+          reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          augmentationTarget: <testLibraryFragment>::@class::B
+          interfaces
+            A
 ''');
   }
 
@@ -6118,33 +6195,7 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class B @32
-        reference: <testLibraryFragment>::@class::B
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::B::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::B
-        methods
-          foo @38
-            reference: <testLibraryFragment>::@class::B::@method::foo
-            enclosingElement: <testLibraryFragment>::@class::B
-            parameters
-              requiredPositional a @42
-                type: String
-            returnType: int
-        augmented
-          mixins
-            A
-          constructors
-            <testLibraryFragment>::@class::B::@constructor::new
-          methods
-            <testLibraryFragment>::@class::B::@method::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/b.dart
       enclosingElement: <testLibrary>
@@ -6153,21 +6204,48 @@
         package:test/a.dart
           enclosingElement: <testLibrary>
           enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        libraryImports
-          package:test/a.dart
-            enclosingElement: <testLibrary>
-            enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-        classes
-          augment class B @60
-            reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            augmentationTarget: <testLibraryFragment>::@class::B
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class B @32
+          reference: <testLibraryFragment>::@class::B
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::B::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::B
+          methods
+            foo @38
+              reference: <testLibraryFragment>::@class::B::@method::foo
+              enclosingElement: <testLibraryFragment>::@class::B
+              parameters
+                requiredPositional a @42
+                  type: String
+              returnType: int
+          augmented
             mixins
               A
+            constructors
+              <testLibraryFragment>::@class::B::@constructor::new
+            methods
+              <testLibraryFragment>::@class::B::@method::foo
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      libraryImports
+        package:test/a.dart
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
+      classes
+        augment class B @60
+          reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          augmentationTarget: <testLibraryFragment>::@class::B
+          mixins
+            A
 ''');
   }
 
@@ -6201,60 +6279,61 @@
     package:test/a.dart
       enclosingElement: <testLibrary>
       enclosingElement3: <testLibraryFragment>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    libraryImports
-      package:test/a.dart
-        enclosingElement: <testLibrary>
-        enclosingElement3: <testLibraryFragment>
-    classes
-      class B @49
-        reference: <testLibraryFragment>::@class::B
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B
-        supertype: A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::B::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::B
-            superConstructor: package:test/a.dart::<fragment>::@class::A::@constructor::new
-        methods
-          foo @65
-            reference: <testLibraryFragment>::@class::B::@method::foo
-            enclosingElement: <testLibraryFragment>::@class::B
-            parameters
-              requiredPositional a @69
-                type: String
-            returnType: int
-            augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B::@methodAugmentation::foo
-        augmented
-          constructors
-            <testLibraryFragment>::@class::B::@constructor::new
-          methods
-            <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B::@methodAugmentation::foo
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/b.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class B @43
-            reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            augmentationTarget: <testLibraryFragment>::@class::B
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      libraryImports
+        package:test/a.dart
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibraryFragment>
+      classes
+        class B @49
+          reference: <testLibraryFragment>::@class::B
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B
+          supertype: A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::B::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::B
+              superConstructor: package:test/a.dart::<fragment>::@class::A::@constructor::new
+          methods
+            foo @65
+              reference: <testLibraryFragment>::@class::B::@method::foo
+              enclosingElement: <testLibraryFragment>::@class::B
+              parameters
+                requiredPositional a @69
+                  type: String
+              returnType: int
+              augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B::@methodAugmentation::foo
+          augmented
+            constructors
+              <testLibraryFragment>::@class::B::@constructor::new
             methods
-              augment foo @57
-                reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B::@methodAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B
-                parameters
-                  requiredPositional a @61
-                    type: String
-                returnType: int
-                augmentationTarget: <testLibraryFragment>::@class::B::@method::foo
+              <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B::@methodAugmentation::foo
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class B @43
+          reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          augmentationTarget: <testLibraryFragment>::@class::B
+          methods
+            augment foo @57
+              reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B::@methodAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::B
+              parameters
+                requiredPositional a @61
+                  type: String
+              returnType: int
+              augmentationTarget: <testLibraryFragment>::@class::B::@method::foo
 ''');
   }
 
@@ -6278,52 +6357,53 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        methods
-          foo @42
-            reference: <testLibraryFragment>::@class::A::@method::foo
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: void
-            augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
-          bar @58
-            reference: <testLibraryFragment>::@class::A::@method::bar
-            enclosingElement: <testLibraryFragment>::@class::A
-            returnType: void
-        augmented
-          methods
-            <testLibraryFragment>::@class::A::@method::bar
-            MethodMember
-              base: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
-              augmentationSubstitution: {T: InvalidType}
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            typeParameters
-              covariant T @45
-                defaultType: dynamic
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          methods
+            foo @42
+              reference: <testLibraryFragment>::@class::A::@method::foo
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: void
+              augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
+            bar @58
+              reference: <testLibraryFragment>::@class::A::@method::bar
+              enclosingElement: <testLibraryFragment>::@class::A
+              returnType: void
+          augmented
             methods
-              augment foo @65
-                reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-                returnType: void
-                augmentationTarget: <testLibraryFragment>::@class::A::@method::foo
+              <testLibraryFragment>::@class::A::@method::bar
+              MethodMember
+                base: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
+                augmentationSubstitution: {T: InvalidType}
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          typeParameters
+            covariant T @45
+              defaultType: dynamic
+          augmentationTarget: <testLibraryFragment>::@class::A
+          methods
+            augment foo @65
+              reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+              returnType: void
+              augmentationTarget: <testLibraryFragment>::@class::A::@method::foo
 ''');
   }
 
@@ -6341,34 +6421,35 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      abstract class A @40
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment abstract class A @52
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        abstract class A @40
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment abstract class A @52
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
 ''');
   }
 
@@ -6386,34 +6467,35 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      base class A @36
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment base class A @48
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        base class A @36
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment base class A @48
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
 ''');
   }
 
@@ -6431,34 +6513,35 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      final class A @37
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment final class A @49
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        final class A @37
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment final class A @49
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
 ''');
   }
 
@@ -6476,34 +6559,35 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      interface class A @41
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment interface class A @53
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        interface class A @41
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment interface class A @53
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
 ''');
   }
 
@@ -6521,34 +6605,35 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      macro class A @37
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment macro class A @49
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        macro class A @37
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment macro class A @49
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
 ''');
   }
 
@@ -6566,34 +6651,35 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      mixin class A @37
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment mixin class A @49
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        mixin class A @37
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment mixin class A @49
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
 ''');
   }
 
@@ -6611,34 +6697,35 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      abstract sealed class A @38
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment abstract sealed class A @50
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        abstract sealed class A @38
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment abstract sealed class A @50
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::A
 ''');
   }
 
@@ -6652,30 +6739,31 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @6
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        interfaces
-          I
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @6
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
           interfaces
             I
-      class I @30
-        reference: <testLibraryFragment>::@class::I
-        enclosingElement: <testLibraryFragment>
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::I::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::I
-        augmented
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
+            interfaces
+              I
+        class I @30
+          reference: <testLibraryFragment>::@class::I
+          enclosingElement: <testLibraryFragment>
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::I::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::I
+          augmented
 ''');
   }
 
@@ -6689,31 +6777,32 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @6
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        interfaces
-          M
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @6
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
           interfaces
             M
-    mixins
-      mixin M @30
-        reference: <testLibraryFragment>::@mixin::M
-        enclosingElement: <testLibraryFragment>
-        superclassConstraints
-          Object
-        augmented
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
+            interfaces
+              M
+      mixins
+        mixin M @30
+          reference: <testLibraryFragment>::@mixin::M
+          enclosingElement: <testLibraryFragment>
           superclassConstraints
             Object
+          augmented
+            superclassConstraints
+              Object
 ''');
   }
 
@@ -6731,42 +6820,43 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      notSimplyBounded class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        typeParameters
-          covariant T @33
-            bound: A<dynamic>
-            defaultType: dynamic
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            typeParameters
-              covariant T @45
-                bound: A<dynamic>
-                defaultType: A<dynamic>
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        notSimplyBounded class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          typeParameters
+            covariant T @33
+              bound: A<dynamic>
+              defaultType: dynamic
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          typeParameters
+            covariant T @45
+              bound: A<dynamic>
+              defaultType: A<dynamic>
+          augmentationTarget: <testLibraryFragment>::@class::A
 ''');
   }
 
@@ -6785,54 +6875,55 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        typeParameters
-          covariant T @33
-            defaultType: dynamic
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-      class B @45
-        reference: <testLibraryFragment>::@class::B
-        enclosingElement: <testLibraryFragment>
-        typeParameters
-          covariant T1 @47
-            defaultType: dynamic
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::B
-        supertype: A<T1>
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::B::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::B
-            superConstructor: ConstructorMember
-              base: <testLibraryFragment>::@class::A::@constructor::new
-              substitution: {T: T1}
-        augmented
-          constructors
-            <testLibraryFragment>::@class::B::@constructor::new
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class B @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::B
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            typeParameters
-              covariant T2 @45
-                defaultType: dynamic
-            augmentationTarget: <testLibraryFragment>::@class::B
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          typeParameters
+            covariant T @33
+              defaultType: dynamic
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+        class B @45
+          reference: <testLibraryFragment>::@class::B
+          enclosingElement: <testLibraryFragment>
+          typeParameters
+            covariant T1 @47
+              defaultType: dynamic
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::B
+          supertype: A<T1>
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::B::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::B
+              superConstructor: ConstructorMember
+                base: <testLibraryFragment>::@class::A::@constructor::new
+                substitution: {T: T1}
+          augmented
+            constructors
+              <testLibraryFragment>::@class::B::@constructor::new
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class B @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::B
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          typeParameters
+            covariant T2 @45
+              defaultType: dynamic
+          augmentationTarget: <testLibraryFragment>::@class::B
 ''');
   }
 
@@ -6859,63 +6950,64 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @56
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-      class B @67
-        reference: <testLibraryFragment>::@class::B
-        enclosingElement: <testLibraryFragment>
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::B::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::B
-      class C @78
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::C
-        supertype: A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
-            superConstructor: <testLibraryFragment>::@class::A::@constructor::new
-        augmented
-          constructors
-            <testLibraryFragment>::@class::C::@constructor::new
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class C @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::C
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            augmentationTarget: <testLibraryFragment>::@class::C
-            augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::C
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
     package:test/b.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class C @43
-            reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::C
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::C
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @56
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+        class B @67
+          reference: <testLibraryFragment>::@class::B
+          enclosingElement: <testLibraryFragment>
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::B::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::B
+        class C @78
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::C
+          supertype: A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
+              superConstructor: <testLibraryFragment>::@class::A::@constructor::new
+          augmented
+            constructors
+              <testLibraryFragment>::@class::C::@constructor::new
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class C @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::C
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          augmentationTarget: <testLibraryFragment>::@class::C
+          augmentation: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::C
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class C @43
+          reference: <testLibrary>::@fragment::package:test/b.dart::@classAugmentation::C
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          augmentationTarget: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::C
 ''');
   }
 
@@ -6934,49 +7026,50 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        typeParameters
-          covariant T @33
-            bound: B
-            defaultType: B
-        augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-        augmented
-          constructors
-            <testLibraryFragment>::@class::A::@constructor::new
-      class B @55
-        reference: <testLibraryFragment>::@class::B
-        enclosingElement: <testLibraryFragment>
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::B::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::B
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          augment class A @43
-            reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            typeParameters
-              covariant T @45
-                bound: B
-                defaultType: B
-            augmentationTarget: <testLibraryFragment>::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          typeParameters
+            covariant T @33
+              bound: B
+              defaultType: B
+          augmentation: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+          augmented
+            constructors
+              <testLibraryFragment>::@class::A::@constructor::new
+        class B @55
+          reference: <testLibraryFragment>::@class::B
+          enclosingElement: <testLibraryFragment>
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::B::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::B
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        augment class A @43
+          reference: <testLibrary>::@fragment::package:test/a.dart::@classAugmentation::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          typeParameters
+            covariant T @45
+              bound: B
+              defaultType: B
+          augmentationTarget: <testLibraryFragment>::@class::A
 ''');
   }
 }
@@ -7008,57 +7101,58 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class C @20
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        metadata
-          Annotation
-            atSign: @ @0
-            name: SimpleIdentifier
-              token: A @1
-              staticElement: <testLibraryFragment>::@class::A
-              staticType: null
-            arguments: ArgumentList
-              leftParenthesis: ( @2
-              arguments
-                RecordLiteral
-                  leftParenthesis: ( @3
-                  fields
-                    IntegerLiteral
-                      literal: 2 @4
-                      staticType: int
-                    NamedExpression
-                      name: Label
-                        label: SimpleIdentifier
-                          token: a @7
-                          staticElement: <null>
-                          staticType: null
-                        colon: : @8
-                      expression: IntegerLiteral
-                        literal: 3 @10
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class C @20
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          metadata
+            Annotation
+              atSign: @ @0
+              name: SimpleIdentifier
+                token: A @1
+                staticElement: <testLibraryFragment>::@class::A
+                staticType: null
+              arguments: ArgumentList
+                leftParenthesis: ( @2
+                arguments
+                  RecordLiteral
+                    leftParenthesis: ( @3
+                    fields
+                      IntegerLiteral
+                        literal: 2 @4
                         staticType: int
-                  rightParenthesis: ) @11
-                  staticType: (int, {int a})
-              rightParenthesis: ) @12
-            element: <testLibraryFragment>::@class::A::@constructor::new
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        constructors
-          const @43
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional o @45
-                type: dynamic
+                      NamedExpression
+                        name: Label
+                          label: SimpleIdentifier
+                            token: a @7
+                            staticElement: <null>
+                            staticType: null
+                          colon: : @8
+                        expression: IntegerLiteral
+                          literal: 3 @10
+                          staticType: int
+                    rightParenthesis: ) @11
+                    staticType: (int, {int a})
+                rightParenthesis: ) @12
+              element: <testLibraryFragment>::@class::A::@constructor::new
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          constructors
+            const @43
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional o @45
+                  type: dynamic
 ''');
   }
 
@@ -7073,47 +7167,48 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class C @22
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        metadata
-          Annotation
-            atSign: @ @0
-            name: SimpleIdentifier
-              token: A @1
-              staticElement: <testLibraryFragment>::@class::A
-              staticType: null
-            arguments: ArgumentList
-              leftParenthesis: ( @2
-              arguments
-                RecordLiteral
-                  constKeyword: const @3
-                  leftParenthesis: ( @9
-                  fields
-                    SimpleStringLiteral
-                      literal: '' @10
-                  rightParenthesis: ) @13
-                  staticType: (String,)
-              rightParenthesis: ) @14
-            element: <testLibraryFragment>::@class::A::@constructor::new
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
-      class A @33
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        constructors
-          const @45
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-            parameters
-              requiredPositional o @47
-                type: dynamic
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class C @22
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          metadata
+            Annotation
+              atSign: @ @0
+              name: SimpleIdentifier
+                token: A @1
+                staticElement: <testLibraryFragment>::@class::A
+                staticType: null
+              arguments: ArgumentList
+                leftParenthesis: ( @2
+                arguments
+                  RecordLiteral
+                    constKeyword: const @3
+                    leftParenthesis: ( @9
+                    fields
+                      SimpleStringLiteral
+                        literal: '' @10
+                    rightParenthesis: ) @13
+                    staticType: (String,)
+                rightParenthesis: ) @14
+              element: <testLibraryFragment>::@class::A::@constructor::new
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
+        class A @33
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          constructors
+            const @45
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+              parameters
+                requiredPositional o @47
+                  type: dynamic
 ''');
   }
 
@@ -7134,49 +7229,50 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class C @31
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          class A @60
-            reference: <testLibrary>::@fragment::package:test/a.dart::@class::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            constructors
-              synthetic @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@class::A::@constructor::new
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
       augmentationImports
         package:test/b.dart
           enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
           reference: <testLibrary>::@augmentation::package:test/b.dart
-          definingUnit
-            reference: <testLibrary>::@fragment::package:test/b.dart
-            enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-            enclosingElement3: <testLibrary>::@fragment::package:test/a.dart
-            classes
-              class B @32
-                reference: <testLibrary>::@fragment::package:test/b.dart::@class::B
-                enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-                constructors
-                  synthetic @-1
-                    reference: <testLibrary>::@fragment::package:test/b.dart::@class::B::@constructor::new
-                    enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@class::B
+          definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class C @31
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        class A @60
+          reference: <testLibrary>::@fragment::package:test/a.dart::@class::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          constructors
+            synthetic @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@class::A::@constructor::new
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::A
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibrary>::@fragment::package:test/a.dart
+      classes
+        class B @32
+          reference: <testLibrary>::@fragment::package:test/b.dart::@class::B
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          constructors
+            synthetic @-1
+              reference: <testLibrary>::@fragment::package:test/b.dart::@class::B::@constructor::new
+              enclosingElement: <testLibrary>::@fragment::package:test/b.dart::@class::B
 ''');
   }
 
@@ -7196,45 +7292,46 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        typeParameters
-          covariant T @33
-            defaultType: dynamic
-        constructors
-          named @42
-            reference: <testLibraryFragment>::@class::A::@constructor::named
-            enclosingElement: <testLibraryFragment>::@class::A
-            periodOffset: 41
-            nameEnd: 47
-            parameters
-              requiredPositional a @50
-                type: T
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          class B @35
-            reference: <testLibrary>::@fragment::package:test/a.dart::@class::B
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            supertype: A<int>
-            constructors
-              @56
-                reference: <testLibrary>::@fragment::package:test/a.dart::@class::B::@constructor::new
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::B
-                superConstructor: ConstructorMember
-                  base: <testLibraryFragment>::@class::A::@constructor::named
-                  substitution: {T: int}
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          typeParameters
+            covariant T @33
+              defaultType: dynamic
+          constructors
+            named @42
+              reference: <testLibraryFragment>::@class::A::@constructor::named
+              enclosingElement: <testLibraryFragment>::@class::A
+              periodOffset: 41
+              nameEnd: 47
+              parameters
+                requiredPositional a @50
+                  type: T
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        class B @35
+          reference: <testLibrary>::@fragment::package:test/a.dart::@class::B
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          supertype: A<int>
+          constructors
+            @56
+              reference: <testLibrary>::@fragment::package:test/a.dart::@class::B::@constructor::new
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::B
+              superConstructor: ConstructorMember
+                base: <testLibraryFragment>::@class::A::@constructor::named
+                substitution: {T: int}
 ''');
   }
 
@@ -7254,37 +7351,38 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        constructors
-          named @39
-            reference: <testLibraryFragment>::@class::A::@constructor::named
-            enclosingElement: <testLibraryFragment>::@class::A
-            periodOffset: 38
-            nameEnd: 44
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          class B @35
-            reference: <testLibrary>::@fragment::package:test/a.dart::@class::B
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            supertype: A
-            constructors
-              @51
-                reference: <testLibrary>::@fragment::package:test/a.dart::@class::B::@constructor::new
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::B
-                superConstructor: <testLibraryFragment>::@class::A::@constructor::named
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          constructors
+            named @39
+              reference: <testLibraryFragment>::@class::A::@constructor::named
+              enclosingElement: <testLibraryFragment>::@class::A
+              periodOffset: 38
+              nameEnd: 44
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        class B @35
+          reference: <testLibrary>::@fragment::package:test/a.dart::@class::B
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          supertype: A
+          constructors
+            @51
+              reference: <testLibrary>::@fragment::package:test/a.dart::@class::B::@constructor::new
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::B
+              superConstructor: <testLibraryFragment>::@class::A::@constructor::named
 ''');
   }
 
@@ -7302,35 +7400,36 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          class B @35
-            reference: <testLibrary>::@fragment::package:test/a.dart::@class::B
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            supertype: A
-            constructors
-              @51
-                reference: <testLibrary>::@fragment::package:test/a.dart::@class::B::@constructor::new
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::B
-                superConstructor: <testLibraryFragment>::@class::A::@constructor::new
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        class B @35
+          reference: <testLibrary>::@fragment::package:test/a.dart::@class::B
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          supertype: A
+          constructors
+            @51
+              reference: <testLibrary>::@fragment::package:test/a.dart::@class::B::@constructor::new
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::B
+              superConstructor: <testLibraryFragment>::@class::A::@constructor::new
 ''');
   }
 
@@ -7348,38 +7447,39 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    typeAliases
-      functionTypeAliasBased notSimplyBounded F @33
-        reference: <testLibraryFragment>::@typeAlias::F
-        aliasedType: dynamic Function(C<dynamic>)
-        aliasedElement: GenericFunctionTypeElement
-          parameters
-            requiredPositional value @37
-              type: C<dynamic>
-          returnType: dynamic
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          notSimplyBounded class C @35
-            reference: <testLibrary>::@fragment::package:test/a.dart::@class::C
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            typeParameters
-              covariant T @37
-                bound: dynamic
-                defaultType: dynamic
-            constructors
-              synthetic @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@class::C::@constructor::new
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::C
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      typeAliases
+        functionTypeAliasBased notSimplyBounded F @33
+          reference: <testLibraryFragment>::@typeAlias::F
+          aliasedType: dynamic Function(C<dynamic>)
+          aliasedElement: GenericFunctionTypeElement
+            parameters
+              requiredPositional value @37
+                type: C<dynamic>
+            returnType: dynamic
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        notSimplyBounded class C @35
+          reference: <testLibrary>::@fragment::package:test/a.dart::@class::C
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          typeParameters
+            covariant T @37
+              bound: dynamic
+              defaultType: dynamic
+          constructors
+            synthetic @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@class::C::@constructor::new
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::C
 ''');
   }
 
@@ -7394,29 +7494,30 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          notSimplyBounded class C @35
-            reference: <testLibrary>::@fragment::package:test/a.dart::@class::C
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            typeParameters
-              covariant T @37
-                bound: C<dynamic>
-                defaultType: dynamic
-            constructors
-              synthetic @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@class::C::@constructor::new
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::C
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        notSimplyBounded class C @35
+          reference: <testLibrary>::@fragment::package:test/a.dart::@class::C
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          typeParameters
+            covariant T @37
+              bound: C<dynamic>
+              defaultType: dynamic
+          constructors
+            synthetic @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@class::C::@constructor::new
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::C
 ''');
   }
 
@@ -7440,9 +7541,7 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/b.dart
       enclosingElement: <testLibrary>
@@ -7451,36 +7550,39 @@
         package:test/a.dart
           enclosingElement: <testLibrary>
           enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        libraryImports
-          package:test/a.dart
-            enclosingElement: <testLibrary>
-            enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-        functions
-          f @51
-            reference: <testLibrary>::@fragment::package:test/b.dart::@function::f
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            parameters
-              optionalNamed default x @58
-                reference: <testLibrary>::@fragment::package:test/b.dart::@function::f::@parameter::x
-                type: int
-                constantInitializer
-                  PrefixedIdentifier
-                    prefix: SimpleIdentifier
-                      token: A @62
-                      staticElement: package:test/a.dart::<fragment>::@class::A
-                      staticType: null
-                    period: . @63
-                    identifier: SimpleIdentifier
-                      token: a @64
-                      staticElement: package:test/a.dart::<fragment>::@class::A::@getter::a
-                      staticType: int
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      libraryImports
+        package:test/a.dart
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
+      functions
+        f @51
+          reference: <testLibrary>::@fragment::package:test/b.dart::@function::f
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          parameters
+            optionalNamed default x @58
+              reference: <testLibrary>::@fragment::package:test/b.dart::@function::f::@parameter::x
+              type: int
+              constantInitializer
+                PrefixedIdentifier
+                  prefix: SimpleIdentifier
+                    token: A @62
+                    staticElement: package:test/a.dart::<fragment>::@class::A
+                    staticType: null
+                  period: . @63
+                  identifier: SimpleIdentifier
+                    token: a @64
                     staticElement: package:test/a.dart::<fragment>::@class::A::@getter::a
                     staticType: int
-            returnType: void
+                  staticElement: package:test/a.dart::<fragment>::@class::A::@getter::a
+                  staticType: int
+          returnType: void
 ''');
   }
 
@@ -7504,9 +7606,7 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/b.dart
       enclosingElement: <testLibrary>
@@ -7520,48 +7620,51 @@
           reference: <testLibrary>::@fragment::package:test/b.dart::@prefix::prefix
           enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
           enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        libraryImports
-          package:test/a.dart as prefix @48
-            enclosingElement: <testLibrary>
-            enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-        libraryImportPrefixes
-          prefix @48
-            reference: <testLibrary>::@fragment::package:test/b.dart::@prefix::prefix
-            enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-            enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-        functions
-          f @61
-            reference: <testLibrary>::@fragment::package:test/b.dart::@function::f
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            parameters
-              optionalNamed default x @68
-                reference: <testLibrary>::@fragment::package:test/b.dart::@function::f::@parameter::x
-                type: int
-                constantInitializer
-                  PropertyAccess
-                    target: PrefixedIdentifier
-                      prefix: SimpleIdentifier
-                        token: prefix @72
-                        staticElement: <testLibrary>::@fragment::package:test/b.dart::@prefix::prefix
-                        staticType: null
-                      period: . @78
-                      identifier: SimpleIdentifier
-                        token: A @79
-                        staticElement: package:test/a.dart::<fragment>::@class::A
-                        staticType: null
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      libraryImports
+        package:test/a.dart as prefix @48
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
+      libraryImportPrefixes
+        prefix @48
+          reference: <testLibrary>::@fragment::package:test/b.dart::@prefix::prefix
+          enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+          enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
+      functions
+        f @61
+          reference: <testLibrary>::@fragment::package:test/b.dart::@function::f
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          parameters
+            optionalNamed default x @68
+              reference: <testLibrary>::@fragment::package:test/b.dart::@function::f::@parameter::x
+              type: int
+              constantInitializer
+                PropertyAccess
+                  target: PrefixedIdentifier
+                    prefix: SimpleIdentifier
+                      token: prefix @72
+                      staticElement: <testLibrary>::@fragment::package:test/b.dart::@prefix::prefix
+                      staticType: null
+                    period: . @78
+                    identifier: SimpleIdentifier
+                      token: A @79
                       staticElement: package:test/a.dart::<fragment>::@class::A
                       staticType: null
-                    operator: . @80
-                    propertyName: SimpleIdentifier
-                      token: a @81
-                      staticElement: package:test/a.dart::<fragment>::@class::A::@getter::a
-                      staticType: int
+                    staticElement: package:test/a.dart::<fragment>::@class::A
+                    staticType: null
+                  operator: . @80
+                  propertyName: SimpleIdentifier
+                    token: a @81
+                    staticElement: package:test/a.dart::<fragment>::@class::A::@getter::a
                     staticType: int
-            returnType: void
+                  staticType: int
+          returnType: void
 ''');
   }
 
@@ -7583,9 +7686,7 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/b.dart
       enclosingElement: <testLibrary>
@@ -7594,30 +7695,33 @@
         package:test/a.dart
           enclosingElement: <testLibrary>
           enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        libraryImports
-          package:test/a.dart
-            enclosingElement: <testLibrary>
-            enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-        topLevelVariables
-          static const b @52
-            reference: <testLibrary>::@fragment::package:test/b.dart::@topLevelVariable::b
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            type: int
-            shouldUseTypeForInitializerInference: false
-            constantInitializer
-              SimpleIdentifier
-                token: a @56
-                staticElement: package:test/a.dart::<fragment>::@getter::a
-                staticType: int
-        accessors
-          synthetic static get b @-1
-            reference: <testLibrary>::@fragment::package:test/b.dart::@getter::b
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            returnType: int
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      libraryImports
+        package:test/a.dart
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
+      topLevelVariables
+        static const b @52
+          reference: <testLibrary>::@fragment::package:test/b.dart::@topLevelVariable::b
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          type: int
+          shouldUseTypeForInitializerInference: false
+          constantInitializer
+            SimpleIdentifier
+              token: a @56
+              staticElement: package:test/a.dart::<fragment>::@getter::a
+              staticType: int
+      accessors
+        synthetic static get b @-1
+          reference: <testLibrary>::@fragment::package:test/b.dart::@getter::b
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          returnType: int
 ''');
   }
 
@@ -7641,9 +7745,7 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/b.dart
       enclosingElement: <testLibrary>
@@ -7652,38 +7754,41 @@
         package:test/a.dart
           enclosingElement: <testLibrary>
           enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        libraryImports
-          package:test/a.dart
-            enclosingElement: <testLibrary>
-            enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-        topLevelVariables
-          static const b @52
-            reference: <testLibrary>::@fragment::package:test/b.dart::@topLevelVariable::b
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            type: int
-            shouldUseTypeForInitializerInference: false
-            constantInitializer
-              PrefixedIdentifier
-                prefix: SimpleIdentifier
-                  token: A @56
-                  staticElement: package:test/a.dart::<fragment>::@class::A
-                  staticType: null
-                period: . @57
-                identifier: SimpleIdentifier
-                  token: a @58
-                  staticElement: package:test/a.dart::<fragment>::@class::A::@getter::a
-                  staticType: int
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      libraryImports
+        package:test/a.dart
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
+      topLevelVariables
+        static const b @52
+          reference: <testLibrary>::@fragment::package:test/b.dart::@topLevelVariable::b
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          type: int
+          shouldUseTypeForInitializerInference: false
+          constantInitializer
+            PrefixedIdentifier
+              prefix: SimpleIdentifier
+                token: A @56
+                staticElement: package:test/a.dart::<fragment>::@class::A
+                staticType: null
+              period: . @57
+              identifier: SimpleIdentifier
+                token: a @58
                 staticElement: package:test/a.dart::<fragment>::@class::A::@getter::a
                 staticType: int
-        accessors
-          synthetic static get b @-1
-            reference: <testLibrary>::@fragment::package:test/b.dart::@getter::b
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            returnType: int
+              staticElement: package:test/a.dart::<fragment>::@class::A::@getter::a
+              staticType: int
+      accessors
+        synthetic static get b @-1
+          reference: <testLibrary>::@fragment::package:test/b.dart::@getter::b
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          returnType: int
 ''');
   }
 
@@ -7707,9 +7812,7 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/b.dart
       enclosingElement: <testLibrary>
@@ -7718,37 +7821,40 @@
         package:test/a.dart
           enclosingElement: <testLibrary>
           enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        libraryImports
-          package:test/a.dart
-            enclosingElement: <testLibrary>
-            enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-        topLevelVariables
-          static const a @52
-            reference: <testLibrary>::@fragment::package:test/b.dart::@topLevelVariable::a
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            type: A
-            shouldUseTypeForInitializerInference: false
-            constantInitializer
-              InstanceCreationExpression
-                constructorName: ConstructorName
-                  type: NamedType
-                    name: A @56
-                    element: package:test/a.dart::<fragment>::@class::A
-                    type: A
-                  staticElement: package:test/a.dart::<fragment>::@class::A::@constructor::new
-                argumentList: ArgumentList
-                  leftParenthesis: ( @57
-                  rightParenthesis: ) @58
-                staticType: A
-        accessors
-          synthetic static get a @-1
-            reference: <testLibrary>::@fragment::package:test/b.dart::@getter::a
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            returnType: A
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      libraryImports
+        package:test/a.dart
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
+      topLevelVariables
+        static const a @52
+          reference: <testLibrary>::@fragment::package:test/b.dart::@topLevelVariable::a
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          type: A
+          shouldUseTypeForInitializerInference: false
+          constantInitializer
+            InstanceCreationExpression
+              constructorName: ConstructorName
+                type: NamedType
+                  name: A @56
+                  element: package:test/a.dart::<fragment>::@class::A
+                  type: A
+                staticElement: package:test/a.dart::<fragment>::@class::A::@constructor::new
+              argumentList: ArgumentList
+                leftParenthesis: ( @57
+                rightParenthesis: ) @58
+              staticType: A
+      accessors
+        synthetic static get a @-1
+          reference: <testLibrary>::@fragment::package:test/b.dart::@getter::a
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          returnType: A
 ''');
   }
 
@@ -7772,9 +7878,7 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/b.dart
       enclosingElement: <testLibrary>
@@ -7788,50 +7892,53 @@
           reference: <testLibrary>::@fragment::package:test/b.dart::@prefix::prefix
           enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
           enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        libraryImports
-          package:test/a.dart as prefix @48
-            enclosingElement: <testLibrary>
-            enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-        libraryImportPrefixes
-          prefix @48
-            reference: <testLibrary>::@fragment::package:test/b.dart::@prefix::prefix
-            enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-            enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-        topLevelVariables
-          static const b @62
-            reference: <testLibrary>::@fragment::package:test/b.dart::@topLevelVariable::b
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            type: int
-            shouldUseTypeForInitializerInference: false
-            constantInitializer
-              PropertyAccess
-                target: PrefixedIdentifier
-                  prefix: SimpleIdentifier
-                    token: prefix @66
-                    staticElement: <testLibrary>::@fragment::package:test/b.dart::@prefix::prefix
-                    staticType: null
-                  period: . @72
-                  identifier: SimpleIdentifier
-                    token: A @73
-                    staticElement: package:test/a.dart::<fragment>::@class::A
-                    staticType: null
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      libraryImports
+        package:test/a.dart as prefix @48
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
+      libraryImportPrefixes
+        prefix @48
+          reference: <testLibrary>::@fragment::package:test/b.dart::@prefix::prefix
+          enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+          enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
+      topLevelVariables
+        static const b @62
+          reference: <testLibrary>::@fragment::package:test/b.dart::@topLevelVariable::b
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          type: int
+          shouldUseTypeForInitializerInference: false
+          constantInitializer
+            PropertyAccess
+              target: PrefixedIdentifier
+                prefix: SimpleIdentifier
+                  token: prefix @66
+                  staticElement: <testLibrary>::@fragment::package:test/b.dart::@prefix::prefix
+                  staticType: null
+                period: . @72
+                identifier: SimpleIdentifier
+                  token: A @73
                   staticElement: package:test/a.dart::<fragment>::@class::A
                   staticType: null
-                operator: . @74
-                propertyName: SimpleIdentifier
-                  token: a @75
-                  staticElement: package:test/a.dart::<fragment>::@class::A::@getter::a
-                  staticType: int
+                staticElement: package:test/a.dart::<fragment>::@class::A
+                staticType: null
+              operator: . @74
+              propertyName: SimpleIdentifier
+                token: a @75
+                staticElement: package:test/a.dart::<fragment>::@class::A::@getter::a
                 staticType: int
-        accessors
-          synthetic static get b @-1
-            reference: <testLibrary>::@fragment::package:test/b.dart::@getter::b
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            returnType: int
+              staticType: int
+      accessors
+        synthetic static get b @-1
+          reference: <testLibrary>::@fragment::package:test/b.dart::@getter::b
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          returnType: int
 ''');
   }
 
@@ -7857,9 +7964,7 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/b.dart
       enclosingElement: <testLibrary>
@@ -7873,43 +7978,46 @@
           reference: <testLibrary>::@fragment::package:test/b.dart::@prefix::prefix
           enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
           enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        libraryImports
-          package:test/a.dart as prefix @48
-            enclosingElement: <testLibrary>
-            enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-        libraryImportPrefixes
-          prefix @48
-            reference: <testLibrary>::@fragment::package:test/b.dart::@prefix::prefix
-            enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-            enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-        functions
-          f @74
-            reference: <testLibrary>::@fragment::package:test/b.dart::@function::f
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            metadata
-              Annotation
-                atSign: @ @57
-                name: PrefixedIdentifier
-                  prefix: SimpleIdentifier
-                    token: prefix @58
-                    staticElement: <testLibrary>::@fragment::package:test/b.dart::@prefix::prefix
-                    staticType: null
-                  period: . @64
-                  identifier: SimpleIdentifier
-                    token: A @65
-                    staticElement: package:test/a.dart::<fragment>::@class::A
-                    staticType: null
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      libraryImports
+        package:test/a.dart as prefix @48
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
+      libraryImportPrefixes
+        prefix @48
+          reference: <testLibrary>::@fragment::package:test/b.dart::@prefix::prefix
+          enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+          enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
+      functions
+        f @74
+          reference: <testLibrary>::@fragment::package:test/b.dart::@function::f
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          metadata
+            Annotation
+              atSign: @ @57
+              name: PrefixedIdentifier
+                prefix: SimpleIdentifier
+                  token: prefix @58
+                  staticElement: <testLibrary>::@fragment::package:test/b.dart::@prefix::prefix
+                  staticType: null
+                period: . @64
+                identifier: SimpleIdentifier
+                  token: A @65
                   staticElement: package:test/a.dart::<fragment>::@class::A
                   staticType: null
-                arguments: ArgumentList
-                  leftParenthesis: ( @66
-                  rightParenthesis: ) @67
-                element: package:test/a.dart::<fragment>::@class::A::@constructor::new
-            returnType: void
+                staticElement: package:test/a.dart::<fragment>::@class::A
+                staticType: null
+              arguments: ArgumentList
+                leftParenthesis: ( @66
+                rightParenthesis: ) @67
+              element: package:test/a.dart::<fragment>::@class::A::@constructor::new
+          returnType: void
 ''');
   }
 
@@ -7931,9 +8039,7 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/b.dart
       enclosingElement: <testLibrary>
@@ -7947,24 +8053,27 @@
           reference: <testLibrary>::@fragment::package:test/b.dart::@prefix::prefix
           enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
           enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        libraryImports
-          package:test/a.dart as prefix @48
-            enclosingElement: <testLibrary>
-            enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-        libraryImportPrefixes
-          prefix @48
-            reference: <testLibrary>::@fragment::package:test/b.dart::@prefix::prefix
-            enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-            enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-        functions
-          f @65
-            reference: <testLibrary>::@fragment::package:test/b.dart::@function::f
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            returnType: A
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      libraryImports
+        package:test/a.dart as prefix @48
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
+      libraryImportPrefixes
+        prefix @48
+          reference: <testLibrary>::@fragment::package:test/b.dart::@prefix::prefix
+          enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+          enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
+      functions
+        f @65
+          reference: <testLibrary>::@fragment::package:test/b.dart::@function::f
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          returnType: A
 ''');
   }
 
@@ -7986,9 +8095,7 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/b.dart
       enclosingElement: <testLibrary>
@@ -7997,25 +8104,28 @@
         package:test/a.dart
           enclosingElement: <testLibrary>
           enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        libraryImports
-          package:test/a.dart
-            enclosingElement: <testLibrary>
-            enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-        topLevelVariables
-          static final b @52
-            reference: <testLibrary>::@fragment::package:test/b.dart::@topLevelVariable::b
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            type: int
-            shouldUseTypeForInitializerInference: false
-        accessors
-          synthetic static get b @-1
-            reference: <testLibrary>::@fragment::package:test/b.dart::@getter::b
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            returnType: int
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      libraryImports
+        package:test/a.dart
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
+      topLevelVariables
+        static final b @52
+          reference: <testLibrary>::@fragment::package:test/b.dart::@topLevelVariable::b
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          type: int
+          shouldUseTypeForInitializerInference: false
+      accessors
+        synthetic static get b @-1
+          reference: <testLibrary>::@fragment::package:test/b.dart::@getter::b
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          returnType: int
 ''');
   }
 
@@ -8040,14 +8150,7 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    functions
-      f @27
-        reference: <testLibraryFragment>::@function::f
-        enclosingElement: <testLibraryFragment>
-        returnType: InvalidType
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/b.dart
       enclosingElement: <testLibrary>
@@ -8056,19 +8159,27 @@
         package:test/a.dart
           enclosingElement: <testLibrary>
           enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        libraryImports
-          package:test/a.dart
-            enclosingElement: <testLibrary>
-            enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-        functions
-          f @48
-            reference: <testLibrary>::@fragment::package:test/b.dart::@function::f
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            returnType: A
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      functions
+        f @27
+          reference: <testLibraryFragment>::@function::f
+          enclosingElement: <testLibraryFragment>
+          returnType: InvalidType
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      libraryImports
+        package:test/a.dart
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
+      functions
+        f @48
+          reference: <testLibrary>::@fragment::package:test/b.dart::@function::f
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          returnType: A
 ''');
   }
 
@@ -8097,31 +8208,32 @@
     package:test/a.dart
       enclosingElement: <testLibrary>
       enclosingElement3: <testLibraryFragment>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    libraryImports
-      package:test/a.dart
-        enclosingElement: <testLibrary>
-        enclosingElement3: <testLibraryFragment>
-    functions
-      f @44
-        reference: <testLibraryFragment>::@function::f
-        enclosingElement: <testLibraryFragment>
-        returnType: A
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/b.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        functions
-          f @31
-            reference: <testLibrary>::@fragment::package:test/b.dart::@function::f
-            enclosingElement: <testLibrary>::@fragment::package:test/b.dart
-            returnType: InvalidType
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      libraryImports
+        package:test/a.dart
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibraryFragment>
+      functions
+        f @44
+          reference: <testLibraryFragment>::@function::f
+          enclosingElement: <testLibraryFragment>
+          returnType: A
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      functions
+        f @31
+          reference: <testLibrary>::@fragment::package:test/b.dart::@function::f
+          enclosingElement: <testLibrary>::@fragment::package:test/b.dart
+          returnType: InvalidType
 ''');
   }
 
@@ -8147,13 +8259,7 @@
     dart:io
       enclosingElement: <testLibrary>
       enclosingElement3: <testLibraryFragment>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    libraryImports
-      dart:io
-        enclosingElement: <testLibrary>
-        enclosingElement3: <testLibraryFragment>
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
@@ -8162,14 +8268,7 @@
         dart:async
           enclosingElement: <testLibrary>
           enclosingElement3: <testLibrary>::@fragment::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        libraryExports
-          dart:async
-            enclosingElement: <testLibrary>
-            enclosingElement3: <testLibrary>::@fragment::package:test/a.dart
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
     package:test/b.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/b.dart
@@ -8180,17 +8279,31 @@
         dart:math
           enclosingElement: <testLibrary>
           enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        libraryExports
-          dart:collection
-            enclosingElement: <testLibrary>
-            enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-          dart:math
-            enclosingElement: <testLibrary>
-            enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      libraryImports
+        dart:io
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibraryFragment>
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      libraryExports
+        dart:async
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibrary>::@fragment::package:test/a.dart
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      libraryExports
+        dart:collection
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
+        dart:math
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
 ''');
   }
 
@@ -8216,13 +8329,7 @@
     dart:io
       enclosingElement: <testLibrary>
       enclosingElement3: <testLibraryFragment>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    libraryImports
-      dart:io
-        enclosingElement: <testLibrary>
-        enclosingElement3: <testLibraryFragment>
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
@@ -8231,14 +8338,7 @@
         dart:async
           enclosingElement: <testLibrary>
           enclosingElement3: <testLibrary>::@fragment::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        libraryImports
-          dart:async
-            enclosingElement: <testLibrary>
-            enclosingElement3: <testLibrary>::@fragment::package:test/a.dart
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
     package:test/b.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/b.dart
@@ -8249,17 +8349,31 @@
         dart:math
           enclosingElement: <testLibrary>
           enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/b.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
-        enclosingElement3: <testLibraryFragment>
-        libraryImports
-          dart:collection
-            enclosingElement: <testLibrary>
-            enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
-          dart:math
-            enclosingElement: <testLibrary>
-            enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
+      definingUnit: <testLibrary>::@fragment::package:test/b.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      libraryImports
+        dart:io
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibraryFragment>
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      libraryImports
+        dart:async
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibrary>::@fragment::package:test/a.dart
+    <testLibrary>::@fragment::package:test/b.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/b.dart
+      enclosingElement3: <testLibraryFragment>
+      libraryImports
+        dart:collection
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
+        dart:math
+          enclosingElement: <testLibrary>
+          enclosingElement3: <testLibrary>::@fragment::package:test/b.dart
 ''');
   }
 
@@ -8279,35 +8393,36 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    functions
-      f @27
-        reference: <testLibraryFragment>::@function::f
-        enclosingElement: <testLibraryFragment>
-        returnType: A
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        classes
-          class A @35
-            reference: <testLibrary>::@fragment::package:test/a.dart::@class::A
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            constructors
-              synthetic @-1
-                reference: <testLibrary>::@fragment::package:test/a.dart::@class::A::@constructor::new
-                enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::A
-        functions
-          f @42
-            reference: <testLibrary>::@fragment::package:test/a.dart::@function::f
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            returnType: A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      functions
+        f @27
+          reference: <testLibraryFragment>::@function::f
+          enclosingElement: <testLibraryFragment>
+          returnType: A
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      classes
+        class A @35
+          reference: <testLibrary>::@fragment::package:test/a.dart::@class::A
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          constructors
+            synthetic @-1
+              reference: <testLibrary>::@fragment::package:test/a.dart::@class::A::@constructor::new
+              enclosingElement: <testLibrary>::@fragment::package:test/a.dart::@class::A
+      functions
+        f @42
+          reference: <testLibrary>::@fragment::package:test/a.dart::@function::f
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          returnType: A
 ''');
   }
 
@@ -8327,35 +8442,36 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class A @31
-        reference: <testLibraryFragment>::@class::A
-        enclosingElement: <testLibraryFragment>
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::A::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::A
-    functions
-      f @38
-        reference: <testLibraryFragment>::@function::f
-        enclosingElement: <testLibraryFragment>
-        returnType: A
+  definingUnit: <testLibraryFragment>
   augmentationImports
     package:test/a.dart
       enclosingElement: <testLibrary>
       reference: <testLibrary>::@augmentation::package:test/a.dart
-      definingUnit
-        reference: <testLibrary>::@fragment::package:test/a.dart
-        enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
-        enclosingElement3: <testLibraryFragment>
-        functions
-          f @31
-            reference: <testLibrary>::@fragment::package:test/a.dart::@function::f
-            enclosingElement: <testLibrary>::@fragment::package:test/a.dart
-            returnType: A
+      definingUnit: <testLibrary>::@fragment::package:test/a.dart
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class A @31
+          reference: <testLibraryFragment>::@class::A
+          enclosingElement: <testLibraryFragment>
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::A::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::A
+      functions
+        f @38
+          reference: <testLibraryFragment>::@function::f
+          enclosingElement: <testLibraryFragment>
+          returnType: A
+    <testLibrary>::@fragment::package:test/a.dart
+      enclosingElement: <testLibrary>::@augmentation::package:test/a.dart
+      enclosingElement3: <testLibraryFragment>
+      functions
+        f @31
+          reference: <testLibrary>::@fragment::package:test/a.dart::@function::f
+          enclosingElement: <testLibrary>::@fragment::package:test/a.dart
+          returnType: A
 ''');
   }
 
@@ -8364,17 +8480,18 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      abstract class C @15
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        abstract class C @15
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
 ''');
   }
 
@@ -8383,17 +8500,18 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      base class C @11
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        constructors
-          synthetic @-1
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        base class C @11
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          constructors
+            synthetic @-1
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
 ''');
   }
 
@@ -8402,17 +8520,18 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class C @6
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        constructors
-          const @16
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class C @6
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          constructors
+            const @16
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
 ''');
   }
 
@@ -8421,17 +8540,18 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class C @6
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        constructors
-          external const @25
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class C @6
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          constructors
+            external const @25
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
 ''');
   }
 
@@ -8446,18 +8566,19 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class C @6
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        constructors
-          @34
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
-            documentationComment: /**\n   * Docs\n   */
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class C @6
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          constructors
+            @34
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
+              documentationComment: /**\n   * Docs\n   */
 ''');
   }
 
@@ -8466,19 +8587,20 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class C @6
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        constructors
-          foo @12
-            reference: <testLibraryFragment>::@class::C::@constructor::foo
-            enclosingElement: <testLibraryFragment>::@class::C
-            periodOffset: 11
-            nameEnd: 15
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class C @6
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          constructors
+            foo @12
+              reference: <testLibraryFragment>::@class::C::@constructor::foo
+              enclosingElement: <testLibraryFragment>::@class::C
+              periodOffset: 11
+              nameEnd: 15
 ''');
   }
 
@@ -8487,22 +8609,23 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class C @6
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        typeParameters
-          covariant T @8
-            defaultType: dynamic
-          covariant U @11
-            defaultType: dynamic
-        constructors
-          @16
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class C @6
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          typeParameters
+            covariant T @8
+              defaultType: dynamic
+            covariant U @11
+              defaultType: dynamic
+          constructors
+            @16
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
 ''');
   }
 
@@ -8511,17 +8634,18 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class C @6
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        constructors
-          @10
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class C @6
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          constructors
+            @10
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
 ''');
   }
 
@@ -8530,17 +8654,18 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class C @6
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        constructors
-          external @19
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class C @6
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          constructors
+            external @19
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
 ''');
   }
 
@@ -8549,17 +8674,18 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class C @6
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        constructors
-          factory @18
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class C @6
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          constructors
+            factory @18
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
 ''');
   }
 
@@ -8569,38 +8695,39 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class C @6
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        fields
-          x @18
-            reference: <testLibraryFragment>::@class::C::@field::x
-            enclosingElement: <testLibraryFragment>::@class::C
-            type: dynamic
-        constructors
-          @21
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
-            parameters
-              requiredPositional final this.x @36
-                type: dynamic
-                field: <testLibraryFragment>::@class::C::@field::x
-        accessors
-          synthetic get x @-1
-            reference: <testLibraryFragment>::@class::C::@getter::x
-            enclosingElement: <testLibraryFragment>::@class::C
-            returnType: dynamic
-          synthetic set x= @-1
-            reference: <testLibraryFragment>::@class::C::@setter::x
-            enclosingElement: <testLibraryFragment>::@class::C
-            parameters
-              requiredPositional _x @-1
-                type: dynamic
-            returnType: void
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class C @6
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          fields
+            x @18
+              reference: <testLibraryFragment>::@class::C::@field::x
+              enclosingElement: <testLibraryFragment>::@class::C
+              type: dynamic
+          constructors
+            @21
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
+              parameters
+                requiredPositional final this.x @36
+                  type: dynamic
+                  field: <testLibraryFragment>::@class::C::@field::x
+          accessors
+            synthetic get x @-1
+              reference: <testLibraryFragment>::@class::C::@getter::x
+              enclosingElement: <testLibraryFragment>::@class::C
+              returnType: dynamic
+            synthetic set x= @-1
+              reference: <testLibraryFragment>::@class::C::@setter::x
+              enclosingElement: <testLibraryFragment>::@class::C
+              parameters
+                requiredPositional _x @-1
+                  type: dynamic
+              returnType: void
 ''');
   }
 
@@ -8609,38 +8736,39 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class C @6
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        fields
-          x @18
-            reference: <testLibraryFragment>::@class::C::@field::x
-            enclosingElement: <testLibraryFragment>::@class::C
-            type: dynamic
-        constructors
-          @21
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
-            parameters
-              requiredPositional final this.x @32
-                type: int
-                field: <testLibraryFragment>::@class::C::@field::x
-        accessors
-          synthetic get x @-1
-            reference: <testLibraryFragment>::@class::C::@getter::x
-            enclosingElement: <testLibraryFragment>::@class::C
-            returnType: dynamic
-          synthetic set x= @-1
-            reference: <testLibraryFragment>::@class::C::@setter::x
-            enclosingElement: <testLibraryFragment>::@class::C
-            parameters
-              requiredPositional _x @-1
-                type: dynamic
-            returnType: void
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class C @6
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          fields
+            x @18
+              reference: <testLibraryFragment>::@class::C::@field::x
+              enclosingElement: <testLibraryFragment>::@class::C
+              type: dynamic
+          constructors
+            @21
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
+              parameters
+                requiredPositional final this.x @32
+                  type: int
+                  field: <testLibraryFragment>::@class::C::@field::x
+          accessors
+            synthetic get x @-1
+              reference: <testLibraryFragment>::@class::C::@getter::x
+              enclosingElement: <testLibraryFragment>::@class::C
+              returnType: dynamic
+            synthetic set x= @-1
+              reference: <testLibraryFragment>::@class::C::@setter::x
+              enclosingElement: <testLibraryFragment>::@class::C
+              parameters
+                requiredPositional _x @-1
+                  type: dynamic
+              returnType: void
 ''');
   }
 
@@ -8649,38 +8777,39 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class C @6
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        fields
-          x @18
-            reference: <testLibraryFragment>::@class::C::@field::x
-            enclosingElement: <testLibraryFragment>::@class::C
-            type: dynamic
-        constructors
-          @21
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
-            parameters
-              requiredPositional final this.x @28
-                type: dynamic
-                field: <testLibraryFragment>::@class::C::@field::x
-        accessors
-          synthetic get x @-1
-            reference: <testLibraryFragment>::@class::C::@getter::x
-            enclosingElement: <testLibraryFragment>::@class::C
-            returnType: dynamic
-          synthetic set x= @-1
-            reference: <testLibraryFragment>::@class::C::@setter::x
-            enclosingElement: <testLibraryFragment>::@class::C
-            parameters
-              requiredPositional _x @-1
-                type: dynamic
-            returnType: void
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class C @6
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          fields
+            x @18
+              reference: <testLibraryFragment>::@class::C::@field::x
+              enclosingElement: <testLibraryFragment>::@class::C
+              type: dynamic
+          constructors
+            @21
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
+              parameters
+                requiredPositional final this.x @28
+                  type: dynamic
+                  field: <testLibraryFragment>::@class::C::@field::x
+          accessors
+            synthetic get x @-1
+              reference: <testLibraryFragment>::@class::C::@getter::x
+              enclosingElement: <testLibraryFragment>::@class::C
+              returnType: dynamic
+            synthetic set x= @-1
+              reference: <testLibraryFragment>::@class::C::@setter::x
+              enclosingElement: <testLibraryFragment>::@class::C
+              parameters
+                requiredPositional _x @-1
+                  type: dynamic
+              returnType: void
 ''');
   }
 
@@ -8694,41 +8823,42 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class C @6
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        fields
-          x @16
-            reference: <testLibraryFragment>::@class::C::@field::x
-            enclosingElement: <testLibraryFragment>::@class::C
-            type: dynamic
-        constructors
-          @21
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
-            parameters
-              requiredPositional final this.x @28
-                type: dynamic Function(double)
-                parameters
-                  requiredPositional b @37
-                    type: double
-                field: <testLibraryFragment>::@class::C::@field::x
-        accessors
-          synthetic get x @-1
-            reference: <testLibraryFragment>::@class::C::@getter::x
-            enclosingElement: <testLibraryFragment>::@class::C
-            returnType: dynamic
-          synthetic set x= @-1
-            reference: <testLibraryFragment>::@class::C::@setter::x
-            enclosingElement: <testLibraryFragment>::@class::C
-            parameters
-              requiredPositional _x @-1
-                type: dynamic
-            returnType: void
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class C @6
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          fields
+            x @16
+              reference: <testLibraryFragment>::@class::C::@field::x
+              enclosingElement: <testLibraryFragment>::@class::C
+              type: dynamic
+          constructors
+            @21
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
+              parameters
+                requiredPositional final this.x @28
+                  type: dynamic Function(double)
+                  parameters
+                    requiredPositional b @37
+                      type: double
+                  field: <testLibraryFragment>::@class::C::@field::x
+          accessors
+            synthetic get x @-1
+              reference: <testLibraryFragment>::@class::C::@getter::x
+              enclosingElement: <testLibraryFragment>::@class::C
+              returnType: dynamic
+            synthetic set x= @-1
+              reference: <testLibraryFragment>::@class::C::@setter::x
+              enclosingElement: <testLibraryFragment>::@class::C
+              parameters
+                requiredPositional _x @-1
+                  type: dynamic
+              returnType: void
 ''');
   }
 
@@ -8742,41 +8872,42 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class C @6
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        fields
-          x @16
-            reference: <testLibraryFragment>::@class::C::@field::x
-            enclosingElement: <testLibraryFragment>::@class::C
-            type: dynamic
-        constructors
-          @21
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
-            parameters
-              requiredPositional final this.x @32
-                type: int Function(double)
-                parameters
-                  requiredPositional b @41
-                    type: double
-                field: <testLibraryFragment>::@class::C::@field::x
-        accessors
-          synthetic get x @-1
-            reference: <testLibraryFragment>::@class::C::@getter::x
-            enclosingElement: <testLibraryFragment>::@class::C
-            returnType: dynamic
-          synthetic set x= @-1
-            reference: <testLibraryFragment>::@class::C::@setter::x
-            enclosingElement: <testLibraryFragment>::@class::C
-            parameters
-              requiredPositional _x @-1
-                type: dynamic
-            returnType: void
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class C @6
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          fields
+            x @16
+              reference: <testLibraryFragment>::@class::C::@field::x
+              enclosingElement: <testLibraryFragment>::@class::C
+              type: dynamic
+          constructors
+            @21
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
+              parameters
+                requiredPositional final this.x @32
+                  type: int Function(double)
+                  parameters
+                    requiredPositional b @41
+                      type: double
+                  field: <testLibraryFragment>::@class::C::@field::x
+          accessors
+            synthetic get x @-1
+              reference: <testLibraryFragment>::@class::C::@getter::x
+              enclosingElement: <testLibraryFragment>::@class::C
+              returnType: dynamic
+            synthetic set x= @-1
+              reference: <testLibraryFragment>::@class::C::@setter::x
+              enclosingElement: <testLibraryFragment>::@class::C
+              parameters
+                requiredPositional _x @-1
+                  type: dynamic
+              returnType: void
 ''');
   }
 
@@ -8790,44 +8921,45 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class C @6
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        fields
-          f @23
-            reference: <testLibraryFragment>::@class::C::@field::f
-            enclosingElement: <testLibraryFragment>::@class::C
-            type: dynamic Function()
-        constructors
-          @28
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
-            parameters
-              requiredPositional final this.f @43
-                type: List<U> Function<T, U>(T)
-                typeParameters
-                  covariant T @45
-                  covariant U @48
-                parameters
-                  requiredPositional t @53
-                    type: T
-                field: <testLibraryFragment>::@class::C::@field::f
-        accessors
-          synthetic get f @-1
-            reference: <testLibraryFragment>::@class::C::@getter::f
-            enclosingElement: <testLibraryFragment>::@class::C
-            returnType: dynamic Function()
-          synthetic set f= @-1
-            reference: <testLibraryFragment>::@class::C::@setter::f
-            enclosingElement: <testLibraryFragment>::@class::C
-            parameters
-              requiredPositional _f @-1
-                type: dynamic Function()
-            returnType: void
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class C @6
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          fields
+            f @23
+              reference: <testLibraryFragment>::@class::C::@field::f
+              enclosingElement: <testLibraryFragment>::@class::C
+              type: dynamic Function()
+          constructors
+            @28
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
+              parameters
+                requiredPositional final this.f @43
+                  type: List<U> Function<T, U>(T)
+                  typeParameters
+                    covariant T @45
+                    covariant U @48
+                  parameters
+                    requiredPositional t @53
+                      type: T
+                  field: <testLibraryFragment>::@class::C::@field::f
+          accessors
+            synthetic get f @-1
+              reference: <testLibraryFragment>::@class::C::@getter::f
+              enclosingElement: <testLibraryFragment>::@class::C
+              returnType: dynamic Function()
+            synthetic set f= @-1
+              reference: <testLibraryFragment>::@class::C::@setter::f
+              enclosingElement: <testLibraryFragment>::@class::C
+              parameters
+                requiredPositional _f @-1
+                  type: dynamic Function()
+              returnType: void
 ''');
   }
 
@@ -8838,53 +8970,54 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class C @6
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        fields
-          x @25
-            reference: <testLibraryFragment>::@class::C::@field::x::@def::0
-            enclosingElement: <testLibraryFragment>::@class::C
-            type: int
-          x @35
-            reference: <testLibraryFragment>::@class::C::@field::x::@def::1
-            enclosingElement: <testLibraryFragment>::@class::C
-            type: String
-        constructors
-          @10
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
-            parameters
-              requiredPositional final this.x @17
-                type: int
-                field: <testLibraryFragment>::@class::C::@field::x::@def::0
-        accessors
-          synthetic get x @-1
-            reference: <testLibraryFragment>::@class::C::@getter::x::@def::0
-            enclosingElement: <testLibraryFragment>::@class::C
-            returnType: int
-          synthetic set x= @-1
-            reference: <testLibraryFragment>::@class::C::@setter::x::@def::0
-            enclosingElement: <testLibraryFragment>::@class::C
-            parameters
-              requiredPositional _x @-1
-                type: int
-            returnType: void
-          synthetic get x @-1
-            reference: <testLibraryFragment>::@class::C::@getter::x::@def::1
-            enclosingElement: <testLibraryFragment>::@class::C
-            returnType: String
-          synthetic set x= @-1
-            reference: <testLibraryFragment>::@class::C::@setter::x::@def::1
-            enclosingElement: <testLibraryFragment>::@class::C
-            parameters
-              requiredPositional _x @-1
-                type: String
-            returnType: void
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class C @6
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          fields
+            x @25
+              reference: <testLibraryFragment>::@class::C::@field::x::@def::0
+              enclosingElement: <testLibraryFragment>::@class::C
+              type: int
+            x @35
+              reference: <testLibraryFragment>::@class::C::@field::x::@def::1
+              enclosingElement: <testLibraryFragment>::@class::C
+              type: String
+          constructors
+            @10
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
+              parameters
+                requiredPositional final this.x @17
+                  type: int
+                  field: <testLibraryFragment>::@class::C::@field::x::@def::0
+          accessors
+            synthetic get x @-1
+              reference: <testLibraryFragment>::@class::C::@getter::x::@def::0
+              enclosingElement: <testLibraryFragment>::@class::C
+              returnType: int
+            synthetic set x= @-1
+              reference: <testLibraryFragment>::@class::C::@setter::x::@def::0
+              enclosingElement: <testLibraryFragment>::@class::C
+              parameters
+                requiredPositional _x @-1
+                  type: int
+              returnType: void
+            synthetic get x @-1
+              reference: <testLibraryFragment>::@class::C::@getter::x::@def::1
+              enclosingElement: <testLibraryFragment>::@class::C
+              returnType: String
+            synthetic set x= @-1
+              reference: <testLibraryFragment>::@class::C::@setter::x::@def::1
+              enclosingElement: <testLibraryFragment>::@class::C
+              parameters
+                requiredPositional _x @-1
+                  type: String
+              returnType: void
 ''');
   }
 
@@ -8894,21 +9027,22 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class C @6
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        constructors
-          @10
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
-            parameters
-              requiredPositional final this.x @17
-                type: dynamic
-                field: <null>
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class C @6
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          constructors
+            @10
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
+              parameters
+                requiredPositional final this.x @17
+                  type: dynamic
+                  field: <null>
 ''');
   }
 
@@ -8917,38 +9051,39 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class C @6
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        fields
-          x @14
-            reference: <testLibraryFragment>::@class::C::@field::x
-            enclosingElement: <testLibraryFragment>::@class::C
-            type: num
-        constructors
-          @17
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
-            parameters
-              requiredPositional final this.x @32
-                type: dynamic
-                field: <testLibraryFragment>::@class::C::@field::x
-        accessors
-          synthetic get x @-1
-            reference: <testLibraryFragment>::@class::C::@getter::x
-            enclosingElement: <testLibraryFragment>::@class::C
-            returnType: num
-          synthetic set x= @-1
-            reference: <testLibraryFragment>::@class::C::@setter::x
-            enclosingElement: <testLibraryFragment>::@class::C
-            parameters
-              requiredPositional _x @-1
-                type: num
-            returnType: void
+  definingUnit: <testLibraryFragment>
+  units
+    <testLibraryFragment>
+      enclosingElement: <testLibrary>
+      classes
+        class C @6
+          reference: <testLibraryFragment>::@class::C
+          enclosingElement: <testLibraryFragment>
+          fields
+            x @14
+              reference: <testLibraryFragment>::@class::C::@field::x
+              enclosingElement: <testLibraryFragment>::@class::C
+              type: num
+          constructors
+            @17
+              reference: <testLibraryFragment>::@class::C::@constructor::new
+              enclosingElement: <testLibraryFragment>::@class::C
+              parameters
+                requiredPositional final this.x @32
+                  type: dynamic
+                  field: <testLibraryFragment>::@class::C::@field::x
+          accessors
+            synthetic get x @-1
+              reference: <testLibraryFragment>::@class::C::@getter::x
+              enclosingElement: <testLibraryFragment>::@class::C
+              returnType: num
+            synthetic set x= @-1
+              reference: <testLibraryFragment>::@class::C::@setter::x
+              enclosingElement: <testLibraryFragment>::@class::C
+              parameters
+                requiredPositional _x @-1
+                  type: num
+              returnType: void
 ''');
   }
 
@@ -8957,38 +9092,39 @@
     checkElementText(library, r'''
 library
   reference: <testLibrary>
-  definingUnit
-    reference: <testLibraryFragment>
-    enclosingElement: <testLibrary>
-    classes
-      class C @6
-        reference: <testLibraryFragment>::@class::C
-        enclosingElement: <testLibraryFragment>
-        fields
-          x @14
-            reference: <testLibraryFragment>::@class::C::@field::x
-            enclosingElement: <testLibraryFragment>::@class::C
-            type: num
-        constructors
-          @17
-            reference: <testLibraryFragment>::@class::C::@constructor::new
-            enclosingElement: <testLibraryFragment>::@class::C
-            parameters
-              requiredPositional final this.x @28
-                type: int
-                field: <testLibraryFragment>::@class::C::@field::x
-        accessors
-          synthetic get x @-1
-            reference: <testLibraryFragment>::@class::C::@getter::x