Parts. Always write 'reference'.

Fixes for import prefixes, '@topLevelVariable'.

Change-Id: Ieb1aff3951291fcb2b805377cd6b4c14bd5e1021
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/377265
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 0e91670..9f2e9c3 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -96,7 +96,7 @@
 // TODO(scheglov): Clean up the list of implicitly analyzed files.
 class AnalysisDriver {
   /// The version of data format, should be incremented on every format change.
-  static const int DATA_VERSION = 374;
+  static const int DATA_VERSION = 375;
 
   /// The number of exception contexts allowed to write. Once this field is
   /// zero, we stop writing any new exception contexts in this process.
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 4674e43..f053bc3 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -5021,7 +5021,7 @@
 
   static List<PrefixElementImpl> buildPrefixesFromImports(
       List<LibraryImportElementImpl> imports) {
-    var prefixes = HashSet<PrefixElementImpl>();
+    var prefixes = <PrefixElementImpl>{};
     for (var import in imports) {
       var prefix = import.prefix;
       if (prefix != null) {
diff --git a/pkg/analyzer/lib/src/summary2/bundle_reader.dart b/pkg/analyzer/lib/src/summary2/bundle_reader.dart
index c349ed3..8ea0b58 100644
--- a/pkg/analyzer/lib/src/summary2/bundle_reader.dart
+++ b/pkg/analyzer/lib/src/summary2/bundle_reader.dart
@@ -1867,7 +1867,7 @@
     var variables = <TopLevelVariableElementImpl>[];
     _readTopLevelVariables(unitElement, unitReference, accessors, variables);
     _readPropertyAccessors(unitElement, unitElement, unitReference, accessors,
-        variables, '@variable');
+        variables, '@topLevelVariable');
     unitElement.accessors = accessors.toFixedList();
     unitElement.topLevelVariables = variables.toFixedList();
     return unitElement;
diff --git a/pkg/analyzer/lib/src/summary2/element_builder.dart b/pkg/analyzer/lib/src/summary2/element_builder.dart
index 36de3ef..fcb8ecf 100644
--- a/pkg/analyzer/lib/src/summary2/element_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/element_builder.dart
@@ -1397,7 +1397,7 @@
 
     PropertyInducingElementImpl property;
     if (enclosingElement is CompilationUnitElement) {
-      var reference = enclosingRef.getChild('@variable').getChild(name);
+      var reference = enclosingRef.getChild('@topLevelVariable').getChild(name);
       var existing = reference.element;
       if (existing is TopLevelVariableElementImpl && canUseExisting(existing)) {
         property = existing;
@@ -1812,8 +1812,9 @@
   Reference addTopLevelVariable(
       String name, TopLevelVariableElementImpl element) {
     _topLevelVariables.add(element);
-    var containerName =
-        element.isAugmentation ? '@variableAugmentation' : '@variable';
+    var containerName = element.isAugmentation
+        ? '@topLevelVariableAugmentation'
+        : '@topLevelVariable';
     return _addReference(containerName, name, element);
   }
 
diff --git a/pkg/analyzer/test/src/dart/analysis/search_test.dart b/pkg/analyzer/test/src/dart/analysis/search_test.dart
index 8051b22..525ad25 100644
--- a/pkg/analyzer/test/src/dart/analysis/search_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/search_test.dart
@@ -899,9 +899,9 @@
 
     var element = findElement.importFind('dart:math').class_('Random');
     await assertElementReferencesText(element, r'''
-self::@variable::v1
+self::@topLevelVariable::v1
   20 2:1 |Random| REFERENCE
-self::@variable::v2
+self::@topLevelVariable::v2
   31 3:1 |Random| REFERENCE
 ''');
   }
@@ -929,7 +929,7 @@
   75 6:21 |A| REFERENCE
 self::@class::B3
   109 7:30 |A| REFERENCE
-self::@variable::v2
+self::@topLevelVariable::v2
   119 8:6 |A| REFERENCE
 ''');
   }
@@ -1687,7 +1687,7 @@
 ''');
     var element = findElement.localVar('v');
     await assertElementReferencesText(element, r'''
-self::@variable::x
+self::@topLevelVariable::x
   30 2:21 |v| READ
 ''');
   }
@@ -2197,7 +2197,7 @@
 ''');
     var element = findElement.prefix('ppp');
     await assertElementReferencesText(element, r'''
-self::@unit::package:test/my_part.dart::@variable::c
+self::@unit::package:test/my_part.dart::@topLevelVariable::c
   16 2:1 |ppp| REFERENCE
 self::@function::main
   76 5:3 |ppp| REFERENCE
@@ -2259,7 +2259,7 @@
 self::@function::main
   76 5:3 |ppp| REFERENCE
   92 6:3 |ppp| REFERENCE
-self::@unit::package:aaa/my_part.dart::@variable::c
+self::@unit::package:aaa/my_part.dart::@topLevelVariable::c
   16 2:1 |ppp| REFERENCE
 ''');
   }
@@ -2284,11 +2284,11 @@
 ''');
     var element = findElement.class_('_C');
     await assertElementReferencesText(element, r'''
-self::@unit::package:test/part1.dart::@variable::v1
+self::@unit::package:test/part1.dart::@topLevelVariable::v1
   13 1:14 |_C| REFERENCE
-self::@unit::package:test/part2.dart::@variable::v2
+self::@unit::package:test/part2.dart::@topLevelVariable::v2
   13 1:14 |_C| REFERENCE
-self::@variable::v
+self::@topLevelVariable::v
   82 6:1 |_C| REFERENCE
 ''');
   }
@@ -2319,11 +2319,11 @@
 
     var element = findElement.partFind('package:test/part1.dart').class_('_C');
     await assertElementReferencesText(element, r'''
-self::@unit::package:test/part1.dart::@variable::v1
+self::@unit::package:test/part1.dart::@topLevelVariable::v1
   25 3:1 |_C| REFERENCE
-self::@unit::package:test/part2.dart::@variable::v2
+self::@unit::package:test/part2.dart::@topLevelVariable::v2
   13 1:14 |_C| REFERENCE
-self::@variable::v
+self::@topLevelVariable::v
   51 4:1 |_C| REFERENCE
 ''');
   }
@@ -2358,11 +2358,11 @@
 
     var element = findElement.class_('_C');
     await assertElementReferencesText(element, r'''
-self::@variable::v
+self::@topLevelVariable::v
   63 5:1 |_C| REFERENCE
-self::@unit::package:aaa/part1.dart::@variable::v1
+self::@unit::package:aaa/part1.dart::@topLevelVariable::v1
   13 1:14 |_C| REFERENCE
-self::@unit::package:aaa/part2.dart::@variable::v2
+self::@unit::package:aaa/part2.dart::@topLevelVariable::v2
   13 1:14 |_C| REFERENCE
 ''');
   }
@@ -2715,7 +2715,7 @@
 ''');
     var element = findNode.bindPatternVariableElement('int v');
     await assertElementReferencesText(element, r'''
-self::@variable::f
+self::@topLevelVariable::f
   34 2:14 |v| READ
   43 2:23 |v| READ
   52 2:32 |v| WRITE
diff --git a/pkg/analyzer/test/src/dart/constant/evaluation_test.dart b/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
index 75e50cf..adfa062 100644
--- a/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
+++ b/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
@@ -40,7 +40,7 @@
     var result = _topLevelVar('x');
     assertDartObjectText(result, '''
 int 42
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -53,7 +53,7 @@
     var result = _topLevelVar('x');
     assertDartObjectText(result, '''
 Null null
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -66,7 +66,7 @@
     var result = _topLevelVar('x');
     assertDartObjectText(result, '''
 int 42
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -81,7 +81,7 @@
     var result = _topLevelVar('x');
     assertDartObjectText(result, '''
 int 6
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -145,14 +145,14 @@
   _name: String v1
   f: double 10.0
   index: int 0
-  variable: <thisLibrary>::<definingUnit>::@variable::x1
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x1
 ''');
     assertDartObjectText(_topLevelVar('x2'), r'''
 E<int>
   _name: String v2
   f: int 20
   index: int 1
-  variable: <thisLibrary>::<definingUnit>::@variable::x2
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x2
 ''');
   }
 
@@ -175,21 +175,21 @@
   _name: String v1
   f: int 10
   index: int 0
-  variable: <thisLibrary>::<definingUnit>::@variable::x1
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x1
 ''');
     assertDartObjectText(_topLevelVar('x2'), r'''
 E<int>
   _name: String v2
   f: int 20
   index: int 1
-  variable: <thisLibrary>::<definingUnit>::@variable::x2
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x2
 ''');
     assertDartObjectText(_topLevelVar('x3'), r'''
 E<String>
   _name: String v3
   f: String abc
   index: int 2
-  variable: <thisLibrary>::<definingUnit>::@variable::x3
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x3
 ''');
   }
 
@@ -203,13 +203,13 @@
 E
   _name: String v1
   index: int 0
-  variable: <thisLibrary>::<definingUnit>::@variable::x1
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x1
 ''');
     assertDartObjectText(_topLevelVar('x2'), r'''
 E
   _name: String v2
   index: int 1
-  variable: <thisLibrary>::<definingUnit>::@variable::x2
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x2
 ''');
   }
 
@@ -220,7 +220,7 @@
     var result = _topLevelVar('v');
     assertDartObjectText(result, '''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::v
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::v
 ''');
   }
 
@@ -231,7 +231,7 @@
     var result = _topLevelVar('v');
     assertDartObjectText(result, '''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::v
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::v
 ''');
   }
 
@@ -242,7 +242,7 @@
     var result = _topLevelVar('v');
     assertDartObjectText(result, '''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::v
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::v
 ''');
   }
 
@@ -253,7 +253,7 @@
     var result = _topLevelVar('v');
     assertDartObjectText(result, '''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::v
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::v
 ''');
   }
 
@@ -264,7 +264,7 @@
     var result = _topLevelVar('v');
     assertDartObjectText(result, '''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::v
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::v
 ''');
   }
 
@@ -276,7 +276,7 @@
     var result = _topLevelVar('v');
     assertDartObjectText(result, '''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::v
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::v
 ''');
   }
 
@@ -287,7 +287,7 @@
     var result = _topLevelVar('v');
     assertDartObjectText(result, '''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::v
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::v
 ''');
   }
 
@@ -302,7 +302,7 @@
     var result = _topLevelVar('v');
     assertDartObjectText(result, '''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::v
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::v
 ''');
   }
 
@@ -334,7 +334,7 @@
     var result = _topLevelVar('v');
     assertDartObjectText(result, '''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::v
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::v
 ''');
   }
 
@@ -345,7 +345,7 @@
     var result = _topLevelVar('v');
     assertDartObjectText(result, '''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::v
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::v
 ''');
   }
 
@@ -391,7 +391,7 @@
     var result = _topLevelVar('v');
     assertDartObjectText(result, '''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::v
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::v
 ''');
   }
 
@@ -422,7 +422,7 @@
     var result = _topLevelVar('v');
     assertDartObjectText(result, '''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::v
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::v
 ''');
   }
 
@@ -613,7 +613,7 @@
     assertDartObjectText(result, r'''
 A
   f: Null null
-  variable: <thisLibrary>::<definingUnit>::@variable::v
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::v
 ''');
   }
 
@@ -627,7 +627,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -639,7 +639,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -652,7 +652,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -664,7 +664,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -677,7 +677,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -690,7 +690,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -703,7 +703,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -716,7 +716,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -729,7 +729,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -740,7 +740,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -751,7 +751,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -774,7 +774,7 @@
     assertDartObjectText(result, r'''
 A<int>
   t: int 0
-  variable: <thisLibrary>::<definingUnit>::@variable::b
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::b
 ''');
   }
 
@@ -791,7 +791,7 @@
     var result = _topLevelVar('x');
     assertDartObjectText(result, '''
 C<int>
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -810,7 +810,7 @@
     assertDartObjectText(result, '''
 C<int>
   f: int 42
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -823,7 +823,7 @@
     var result = _topLevelVar('x');
     assertDartObjectText(result, '''
 int 42
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -837,7 +837,7 @@
     var result = _topLevelVar('x');
     assertDartObjectText(result, '''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -851,7 +851,7 @@
     var result = _topLevelVar('x');
     assertDartObjectText(result, '''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -864,7 +864,7 @@
     var result = _topLevelVar('x');
     assertDartObjectText(result, '''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -877,7 +877,7 @@
     var result = _topLevelVar('x');
     assertDartObjectText(result, '''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -891,7 +891,7 @@
     assertDartObjectText(result, '''
 List
   elementType: int
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -908,7 +908,7 @@
   elements
     int 0
     int 1
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -925,7 +925,7 @@
     entry
       key: int 0
       value: int 1
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -952,7 +952,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1012,7 +1012,7 @@
     var result = _topLevelVar('v2');
     assertDartObjectText(result, r'''
 int 3
-  variable: <thisLibrary>::<definingUnit>::@variable::v2
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::v2
 ''');
   }
 
@@ -1023,7 +1023,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -1034,7 +1034,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -1046,7 +1046,7 @@
     dartObjectPrinterConfiguration.withHexIntegers = true;
     assertDartObjectText(result, r'''
 int 0xffffff
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -1057,7 +1057,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 int 0
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -1068,7 +1068,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 int 0
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -1090,7 +1090,7 @@
     dartObjectPrinterConfiguration.withHexIntegers = true;
     assertDartObjectText(result, r'''
 int 0xffffffff
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -1102,7 +1102,7 @@
     dartObjectPrinterConfiguration.withHexIntegers = true;
     assertDartObjectText(result, r'''
 int 0x1f
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -1113,7 +1113,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 int 0
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -1124,7 +1124,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 int 0
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -1146,7 +1146,7 @@
     dartObjectPrinterConfiguration.withHexIntegers = true;
     assertDartObjectText(result, r'''
 int 0xff
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -1157,7 +1157,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -1168,7 +1168,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -1218,7 +1218,7 @@
   element: <thisLibrary>::<definingUnit>::@function::f
   typeArguments
     int
-  variable: <thisLibrary>::<definingUnit>::@variable::h
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::h
 ''');
   }
 
@@ -1230,7 +1230,7 @@
     var result = _topLevelVar('x');
     assertDartObjectText(result, r'''
 <unknown> int
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -1334,7 +1334,7 @@
   element: <thisLibrary>::<definingUnit>::@class::C::@constructor::foo
   typeArguments
     int
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -1351,7 +1351,7 @@
   element: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
   typeArguments
     int
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -1364,7 +1364,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1377,7 +1377,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1390,7 +1390,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1403,7 +1403,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1416,7 +1416,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1429,7 +1429,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1442,7 +1442,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1455,7 +1455,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1468,7 +1468,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1481,7 +1481,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1495,7 +1495,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1508,7 +1508,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1521,7 +1521,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1536,7 +1536,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1548,7 +1548,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1560,7 +1560,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1574,7 +1574,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1587,7 +1587,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1602,7 +1602,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1614,7 +1614,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1626,7 +1626,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1643,7 +1643,7 @@
   element: <thisLibrary>::<definingUnit>::@class::C::@constructor::foo
   typeArguments
     int
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -1660,7 +1660,7 @@
   element: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
   typeArguments
     int
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -1691,7 +1691,7 @@
   element: <thisLibrary>::<definingUnit>::@function::foo
   typeArguments
     int
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -1708,7 +1708,7 @@
   element: <thisLibrary>::<definingUnit>::@function::foo
   typeArguments
     int
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -1723,7 +1723,7 @@
   element: <thisLibrary>::<definingUnit>::@function::f
   typeArguments
     int
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -1740,7 +1740,7 @@
   element: <thisLibrary>::<definingUnit>::@function::f
   typeArguments
     String
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -1807,7 +1807,7 @@
     var result = _topLevelVar('g');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -1819,7 +1819,7 @@
     var result = _topLevelVar('g');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -1831,7 +1831,7 @@
     var result = _topLevelVar('g');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -1843,7 +1843,7 @@
     var result = _topLevelVar('g');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -1856,7 +1856,7 @@
     var result = _topLevelVar('g');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -1869,7 +1869,7 @@
     var result = _topLevelVar('g');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -1881,7 +1881,7 @@
     var result = _topLevelVar('g');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -1893,7 +1893,7 @@
     var result = _topLevelVar('g');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -1905,7 +1905,7 @@
     var result = _topLevelVar('g');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -1918,7 +1918,7 @@
     var result = _topLevelVar('g');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -1932,7 +1932,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -1946,7 +1946,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -1958,7 +1958,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -1972,7 +1972,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -1986,7 +1986,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -2001,7 +2001,7 @@
     assertDartObjectText(result, r'''
 void Function<T>(T)
   element: <thisLibrary>::<definingUnit>::@function::foo
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -2014,7 +2014,7 @@
     assertDartObjectText(result, r'''
 void Function<T>(T)
   element: <thisLibrary>::<definingUnit>::@function::f
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -2026,7 +2026,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -2040,7 +2040,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 A
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -2065,7 +2065,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 A
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -2105,7 +2105,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -2122,7 +2122,7 @@
     var result = _topLevelVar('b');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::b
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::b
 ''');
   }
 
@@ -2142,7 +2142,7 @@
     var result = _topLevelVar('b');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::b
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::b
 ''');
   }
 
@@ -2155,7 +2155,7 @@
     var result = _topLevelVar('b');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::b
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::b
 ''');
   }
 
@@ -2168,7 +2168,7 @@
     var result = _topLevelVar('b');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::b
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::b
 ''');
   }
 
@@ -2180,7 +2180,7 @@
     var result = _topLevelVar('b');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::b
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::b
 ''');
   }
 
@@ -2197,7 +2197,7 @@
     var result = _topLevelVar('b');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::b
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::b
 ''');
   }
 
@@ -2217,7 +2217,7 @@
     var result = _topLevelVar('b');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::b
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::b
 ''');
   }
 
@@ -2230,7 +2230,7 @@
     var result = _topLevelVar('b');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::b
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::b
 ''');
   }
 
@@ -2279,7 +2279,7 @@
     String a
     String b
     String c
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -2291,7 +2291,7 @@
     assertDartObjectText(result, r'''
 List
   elementType: void Function()
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -2329,7 +2329,7 @@
     String a
     String b
     String c
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -2345,11 +2345,11 @@
   elementType: int
   elements
     int 0
-      variable: <thisLibrary>::<definingUnit>::@variable::a
+      variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
     int 1
     int 2
-      variable: <thisLibrary>::<definingUnit>::@variable::b
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+      variable: <thisLibrary>::<definingUnit>::@topLevelVariable::b
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -2378,7 +2378,7 @@
   elementType: String
   elements
     String anotherString
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -2397,7 +2397,7 @@
   elements
     String anotherString
     String string
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -2442,7 +2442,7 @@
     assertDartObjectText(result, '''
 void Function(int)
   element: <thisLibrary>::<definingUnit>::@function::f
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -2458,7 +2458,7 @@
   element: <thisLibrary>::<definingUnit>::@function::f
   typeArguments
     int
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -2476,7 +2476,7 @@
   element: <thisLibrary>::<definingUnit>::@function::f
   typeArguments
     int
-  variable: <thisLibrary>::<definingUnit>::@variable::h
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::h
 ''');
   }
 
@@ -2493,7 +2493,7 @@
   element: <thisLibrary>::<definingUnit>::@function::f
   typeArguments
     int
-  variable: <thisLibrary>::<definingUnit>::@variable::h
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::h
 ''');
   }
 
@@ -2508,7 +2508,7 @@
     assertDartObjectText(result, '''
 void Function<T>(T)
   element: <thisLibrary>::<definingUnit>::@function::f
-  variable: <thisLibrary>::<definingUnit>::@variable::h
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::h
 ''');
   }
 
@@ -2542,7 +2542,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, '''
 int -43
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -2586,7 +2586,7 @@
     var result = _topLevelVar('v2');
     assertDartObjectText(result, r'''
 int -1
-  variable: <thisLibrary>::<definingUnit>::@variable::v2
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::v2
 ''');
   }
 
@@ -2597,7 +2597,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -2617,7 +2617,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 double -42.3
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -2628,7 +2628,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 int -42
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -2639,7 +2639,7 @@
     var result = _topLevelVar('x');
     assertDartObjectText(result, r'''
 int 6
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -2650,7 +2650,7 @@
     var result = _topLevelVar('x');
     assertDartObjectText(result, r'''
 int 6
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -2666,7 +2666,7 @@
     assertDartObjectText(result, '''
 void Function(int)
   element: <thisLibrary>::<definingUnit>::@class::C::@method::f
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -2684,7 +2684,7 @@
   element: <thisLibrary>::<definingUnit>::@class::C::@method::f
   typeArguments
     int
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -2700,7 +2700,7 @@
     assertDartObjectText(result, '''
 int Function(String)
   element: <thisLibrary>::<definingUnit>::@extension::E::@method::f
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -2716,7 +2716,7 @@
     assertDartObjectText(result, '''
 int Function(String)
   element: <thisLibrary>::<definingUnit>::@extensionType::ET::@method::f
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -2741,7 +2741,7 @@
   namedFields
     f1: int 10
     f2: double 2.3
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -2755,7 +2755,7 @@
   namedFields
     f1: int 10
     f2: int -3
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -2784,7 +2784,7 @@
     positionalFields
       $1: int 42
       $2: int 42
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -2799,7 +2799,7 @@
     $1: int 20
     $2: int 0
     $3: int 7
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -2824,7 +2824,7 @@
     $2: String b
   namedFields
     c: bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -2886,7 +2886,7 @@
       key: void Function()
         element: <thisLibrary>::<definingUnit>::@function::fn
       value: int 2
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -2942,7 +2942,7 @@
     entry
       key: String c
       value: String o
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -2961,7 +2961,7 @@
     entry
       key: String string
       value: int 1
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -2993,7 +2993,7 @@
     entry
       key: String anotherString
       value: int 0
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -3015,11 +3015,11 @@
   elements
     C
       x: double 0.0
-      variable: <thisLibrary>::<definingUnit>::@variable::cp0
+      variable: <thisLibrary>::<definingUnit>::@topLevelVariable::cp0
     C
       x: double -0.0
-      variable: <thisLibrary>::<definingUnit>::@variable::cm0
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+      variable: <thisLibrary>::<definingUnit>::@topLevelVariable::cm0
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -3061,7 +3061,7 @@
   elements
     String anotherString
     String string
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -3078,7 +3078,7 @@
 Set
   elements
     String anotherString
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -3090,7 +3090,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, '''
 Type C
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -3103,7 +3103,7 @@
     assertDartObjectText(result, '''
 void Function(int)
   element: <thisLibrary>::<definingUnit>::@function::f
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -3118,7 +3118,7 @@
   element: <thisLibrary>::<definingUnit>::@function::f
   typeArguments
     int
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -3131,7 +3131,7 @@
     assertDartObjectText(result, '''
 void Function(int)
   element: <thisLibrary>::<definingUnit>::@function::f
-  variable: <thisLibrary>::<definingUnit>::@variable::g
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::g
 ''');
   }
 
@@ -3147,7 +3147,7 @@
   element: <thisLibrary>::<definingUnit>::@function::f
   typeArguments
     int
-  variable: <thisLibrary>::<definingUnit>::@variable::h
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::h
 ''');
   }
 
@@ -3161,7 +3161,7 @@
     assertDartObjectText(result, '''
 void Function<T>(T)
   element: <thisLibrary>::<definingUnit>::@function::f
-  variable: <thisLibrary>::<definingUnit>::@variable::h
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::h
 ''');
   }
 
@@ -3202,7 +3202,7 @@
     element: <thisLibrary>::<definingUnit>::@function::f
     typeArguments
       int
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -3220,7 +3220,7 @@
   element: <thisLibrary>::<definingUnit>::@function::f
   typeArguments
     int
-  variable: <thisLibrary>::<definingUnit>::@variable::h
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::h
 ''');
   }
 
@@ -3454,7 +3454,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, '''
 String abcdef
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -3541,7 +3541,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 double 5.5
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -3566,7 +3566,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 int 5
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -3577,7 +3577,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 String ab
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -3588,7 +3588,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -3676,7 +3676,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 int 10
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -3696,7 +3696,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 double 1.3913043478260871
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -3707,7 +3707,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 double Infinity
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -3718,7 +3718,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 double 1.5
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -3729,7 +3729,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 double Infinity
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -3744,7 +3744,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -3759,7 +3759,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -3770,7 +3770,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 double 0.9000000000000004
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -3781,7 +3781,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 int 1
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -3792,7 +3792,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -3803,7 +3803,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -3834,7 +3834,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -3932,7 +3932,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -4042,7 +4042,7 @@
     dartObjectPrinterConfiguration.withHexIntegers = true;
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -4054,7 +4054,7 @@
     dartObjectPrinterConfiguration.withHexIntegers = true;
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -4067,7 +4067,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 int 0
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -4080,7 +4080,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 int 1
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -4115,7 +4115,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 int 0
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -4159,7 +4159,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 int 1
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -4210,7 +4210,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 double 3.45
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -4230,7 +4230,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 int 3
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -4242,7 +4242,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -4253,7 +4253,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -4271,7 +4271,7 @@
     var result = _topLevelVar('b');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::b
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::b
 ''');
   }
 
@@ -4289,7 +4289,7 @@
     var result = _topLevelVar('b');
     assertDartObjectText(result, r'''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::b
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::b
 ''');
   }
 
@@ -4304,7 +4304,7 @@
     var result = _topLevelVar('b');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::b
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::b
 ''');
   }
 
@@ -4319,7 +4319,7 @@
     var result = _topLevelVar('b');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::b
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::b
 ''');
   }
 
@@ -4337,7 +4337,7 @@
     var result = _topLevelVar('b');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::b
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::b
 ''');
   }
 
@@ -4355,7 +4355,7 @@
     var result = _topLevelVar('b');
     assertDartObjectText(result, r'''
 bool true
-  variable: <thisLibrary>::<definingUnit>::@variable::b
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::b
 ''');
   }
 
@@ -4366,7 +4366,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, '''
 Null null
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -4377,7 +4377,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 String a
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -4397,7 +4397,7 @@
     var result = _topLevelVar('x');
     assertDartObjectText(result, '''
 int 42
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -4452,7 +4452,7 @@
     var result = _topLevelVar('v2');
     assertDartObjectText(result, r'''
 int 3
-  variable: <thisLibrary>::<definingUnit>::@variable::v2
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::v2
 ''');
   }
 
@@ -4512,7 +4512,7 @@
     var result = _evaluateConstant('a', lexicalEnvironment: environment);
     assertDartObjectText(result, r'''
 int 3
-  variable: <thisLibrary>::<definingUnit>::@variable::b
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::b
 ''');
   }
 
@@ -4524,7 +4524,7 @@
     var result = _topLevelVar('b');
     assertDartObjectText(result, '''
 int 42
-  variable: <thisLibrary>::<definingUnit>::@variable::b
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::b
 ''');
   }
 
@@ -4535,7 +4535,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, r'''
 int 3
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -4546,7 +4546,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, '''
 String abc
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -4567,7 +4567,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, r'''
 String a3c
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 }
@@ -4711,7 +4711,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, '''
 A
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -4747,7 +4747,7 @@
     var result = _topLevelVar('c');
     assertDartObjectText(result, '''
 A
-  variable: <thisLibrary>::<definingUnit>::@variable::c
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::c
 ''');
   }
 
@@ -4792,7 +4792,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, '''
 A
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -4826,7 +4826,7 @@
     var result = _topLevelVar('v');
     assertDartObjectText(result, '''
 A
-  variable: <thisLibrary>::<definingUnit>::@variable::v
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::v
 ''');
   }
 
@@ -4862,7 +4862,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, '''
 A
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -4908,7 +4908,7 @@
     assertDartObjectText(result, '''
 B
   (super): A
-  variable: <thisLibrary>::<definingUnit>::@variable::b
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::b
 ''');
   }
 
@@ -4985,7 +4985,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, '''
 A
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -4996,7 +4996,7 @@
 ''');
     assertDartObjectText(_topLevelVar('a'), '''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
     assertDartObjectText(
         _evaluateConstant('a', declaredVariables: {'a': 'true'}), '''
@@ -5024,7 +5024,7 @@
     var result = _topLevelVar('a');
     assertDartObjectText(result, '''
 <unknown> bool
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -5038,12 +5038,12 @@
     var leftResult = _topLevelVar('left');
     assertDartObjectText(leftResult, '''
 <unknown> bool
-  variable: <thisLibrary>::<definingUnit>::@variable::left
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::left
 ''');
     var rightResult = _topLevelVar('right');
     assertDartObjectText(rightResult, '''
 <unknown> bool
-  variable: <thisLibrary>::<definingUnit>::@variable::right
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::right
 ''');
   }
 
@@ -5057,12 +5057,12 @@
     var leftResult = _topLevelVar('left');
     assertDartObjectText(leftResult, '''
 <unknown> bool
-  variable: <thisLibrary>::<definingUnit>::@variable::left
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::left
 ''');
     var rightResult = _topLevelVar('right');
     assertDartObjectText(rightResult, '''
 <unknown> bool
-  variable: <thisLibrary>::<definingUnit>::@variable::right
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::right
 ''');
   }
 
@@ -5074,7 +5074,7 @@
     var result = _topLevelVar('x');
     assertDartObjectText(result, '''
 <unknown> Map<int, String>
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -5088,12 +5088,12 @@
     var leftResult = _topLevelVar('left');
     assertDartObjectText(leftResult, '''
 <unknown> bool
-  variable: <thisLibrary>::<definingUnit>::@variable::left
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::left
 ''');
     var rightResult = _topLevelVar('right');
     assertDartObjectText(rightResult, '''
 <unknown> bool
-  variable: <thisLibrary>::<definingUnit>::@variable::right
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::right
 ''');
   }
 
@@ -5107,12 +5107,12 @@
     var leftResult = _topLevelVar('left');
     assertDartObjectText(leftResult, '''
 <unknown> bool
-  variable: <thisLibrary>::<definingUnit>::@variable::left
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::left
 ''');
     var rightResult = _topLevelVar('right');
     assertDartObjectText(rightResult, '''
 <unknown> bool
-  variable: <thisLibrary>::<definingUnit>::@variable::right
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::right
 ''');
   }
 
@@ -5138,7 +5138,7 @@
     var result = _topLevelVar('x');
     assertDartObjectText(result, '''
 <unknown> Set<int>
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -5152,12 +5152,12 @@
     var leftResult = _topLevelVar('left');
     assertDartObjectText(leftResult, '''
 <unknown> bool
-  variable: <thisLibrary>::<definingUnit>::@variable::left
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::left
 ''');
     var rightResult = _topLevelVar('right');
     assertDartObjectText(rightResult, '''
 <unknown> bool
-  variable: <thisLibrary>::<definingUnit>::@variable::right
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::right
 ''');
   }
 
@@ -5171,12 +5171,12 @@
     var leftResult = _topLevelVar('left');
     assertDartObjectText(leftResult, '''
 <unknown> bool
-  variable: <thisLibrary>::<definingUnit>::@variable::left
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::left
 ''');
     var rightResult = _topLevelVar('right');
     assertDartObjectText(rightResult, '''
 <unknown> bool
-  variable: <thisLibrary>::<definingUnit>::@variable::right
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::right
 ''');
   }
 
@@ -5202,7 +5202,7 @@
     var result = _topLevelVar('x');
     assertDartObjectText(result, '''
 <unknown> List<int>
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -5226,7 +5226,7 @@
 ''');
     assertDartObjectText(_topLevelVar('a'), '''
 bool false
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
     assertDartObjectText(
         _evaluateConstant('a', declaredVariables: {'a': '42'}), '''
@@ -5295,7 +5295,7 @@
     element: <thisLibrary>::<definingUnit>::@function::g
     typeArguments
       T
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -5311,7 +5311,7 @@
     assertDartObjectText(result, '''
 A<int>
   f: Type int
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -5327,7 +5327,7 @@
     assertDartObjectText(result, '''
 A<dynamic>
   f: Type dynamic
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -5345,7 +5345,7 @@
 A<int, String>
   f: Type int
   g: Type String
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -5399,7 +5399,7 @@
 
     assertDartObjectText(_topLevelVar('a'), '''
 int 0
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
     assertDartObjectText(
         _evaluateConstant('a', declaredVariables: {'a': '5'}), '''
@@ -5495,7 +5495,7 @@
     assertDartObjectText(result, '''
 A<int>
   f: Type int
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -5505,7 +5505,7 @@
 ''');
     assertDartObjectText(_topLevelVar('a'), '''
 String <empty>
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
     assertDartObjectText(
         _evaluateConstant('a', declaredVariables: {'a': 'test'}), '''
@@ -5536,7 +5536,7 @@
     a: int 1
     b: int 2
   c: int 3
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -5563,7 +5563,7 @@
     a: int 1
     b: int 2
   c: int 3
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -5588,7 +5588,7 @@
   (super): A
     a: int 1
   b: int 2
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -5613,7 +5613,7 @@
   (super): A
     a: int 1
   b: int 2
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -5638,7 +5638,7 @@
   (super): A
     a: int 1
   b: int 2
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -5663,7 +5663,7 @@
   (super): A
     a: int 1
   b: int 2
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -5688,7 +5688,7 @@
   (super): A
     a: int 1
   b: int 2
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -5713,7 +5713,7 @@
   (super): A
     a: int 1
   b: int 2
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -5738,7 +5738,7 @@
   (super): A
     a: int 1
   b: int 2
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -5763,7 +5763,7 @@
   (super): A
     a: int 1
   b: int 2
-  variable: <thisLibrary>::<definingUnit>::@variable::x
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -5816,7 +5816,7 @@
 B<int>
   (super): A<int>
     f: Type int
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -5836,7 +5836,7 @@
 B<int>
   (super): A
     f: Type int
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 }
diff --git a/pkg/analyzer/test/src/dart/resolution/augmented_expression_test.dart b/pkg/analyzer/test/src/dart/resolution/augmented_expression_test.dart
index d9d0e4f..5f0028e 100644
--- a/pkg/analyzer/test/src/dart/resolution/augmented_expression_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/augmented_expression_test.dart
@@ -289,7 +289,7 @@
     assertResolvedNodeText(node, r'''
 AugmentedExpression
   augmentedKeyword: augmented
-  element: <thisLibrary>::<definingUnit>::@variable::foo
+  element: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
   staticType: int
 ''');
   }
diff --git a/pkg/analyzer/test/src/dart/resolution/constant_test.dart b/pkg/analyzer/test/src/dart/resolution/constant_test.dart
index 4d29eb1..c78a760 100644
--- a/pkg/analyzer/test/src/dart/resolution/constant_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/constant_test.dart
@@ -130,7 +130,7 @@
       alias: package:test/a.dart::<definingUnit>::@typeAlias::F
         typeArguments
           double
-  variable: <thisLibrary>::<definingUnit>::@variable::v
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::v
 ''');
   }
 
diff --git a/pkg/analyzer/test/src/dart/resolution/library_import_test.dart b/pkg/analyzer/test/src/dart/resolution/library_import_test.dart
index f5589a9..0a57beb 100644
--- a/pkg/analyzer/test/src/dart/resolution/library_import_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/library_import_test.dart
@@ -471,7 +471,7 @@
                 leftParenthesis: (
                 rightParenthesis: )
               staticType: A
-            declaredElement: <thisLibrary>::<definingUnit>::@variable::a
+            declaredElement: <thisLibrary>::<definingUnit>::@topLevelVariable::a
       semicolon: ;
       declaredElement: <null>
 ''');
@@ -571,7 +571,7 @@
                 leftParenthesis: (
                 rightParenthesis: )
               staticType: A
-            declaredElement: <thisLibrary>::<definingUnit>::@variable::a
+            declaredElement: <thisLibrary>::<definingUnit>::@topLevelVariable::a
       semicolon: ;
       declaredElement: <null>
 ''');
@@ -793,7 +793,7 @@
                 leftParenthesis: (
                 rightParenthesis: )
               staticType: A
-            declaredElement: <thisLibrary>::<definingUnit>::@variable::a
+            declaredElement: <thisLibrary>::<definingUnit>::@topLevelVariable::a
       semicolon: ;
       declaredElement: <null>
 ''');
diff --git a/pkg/analyzer/test/src/dart/resolution/metadata_test.dart b/pkg/analyzer/test/src/dart/resolution/metadata_test.dart
index 5016e33..6a2ed2f 100644
--- a/pkg/analyzer/test/src/dart/resolution/metadata_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/metadata_test.dart
@@ -40,7 +40,7 @@
 ''');
     _assertAnnotationValueText(annotation, '''
 int 42
-  variable: <thisLibrary>::<definingUnit>::@variable::a
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::a
 ''');
   }
 
@@ -1737,7 +1737,7 @@
 
     _assertAnnotationValueText(node, '''
 int 42
-  variable: package:test/a.dart::<definingUnit>::@variable::foo
+  variable: package:test/a.dart::<definingUnit>::@topLevelVariable::foo
 ''');
   }
 
@@ -2586,7 +2586,7 @@
     var element = node.elementAnnotation!;
     _assertElementAnnotationValueText(element, r'''
 int 42
-  variable: <thisLibrary>::<definingUnit>::@variable::foo
+  variable: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
 ''');
   }
 
diff --git a/pkg/analyzer/test/src/dart/resolution/record_literal_test.dart b/pkg/analyzer/test/src/dart/resolution/record_literal_test.dart
index 5d4d703..534a161 100644
--- a/pkg/analyzer/test/src/dart/resolution/record_literal_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/record_literal_test.dart
@@ -914,7 +914,7 @@
       staticType: int
     rightParenthesis: )
     staticType: int
-  declaredElement: <thisLibrary>::<definingUnit>::@variable::x
+  declaredElement: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -940,7 +940,7 @@
       staticType: int
     rightParenthesis: )
     staticType: int
-  declaredElement: <thisLibrary>::<definingUnit>::@variable::x
+  declaredElement: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -964,7 +964,7 @@
       staticType: int
     rightParenthesis: )
     staticType: int
-  declaredElement: <thisLibrary>::<definingUnit>::@variable::x
+  declaredElement: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -988,7 +988,7 @@
       staticType: int
     rightParenthesis: )
     staticType: int
-  declaredElement: <thisLibrary>::<definingUnit>::@variable::x
+  declaredElement: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -1013,7 +1013,7 @@
       staticType: InvalidType
     rightParenthesis: )
     staticType: InvalidType
-  declaredElement: <thisLibrary>::<definingUnit>::@variable::x
+  declaredElement: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
diff --git a/pkg/analyzer/test/src/dart/resolution/top_level_variable_test.dart b/pkg/analyzer/test/src/dart/resolution/top_level_variable_test.dart
index c3aeac9..0209c00 100644
--- a/pkg/analyzer/test/src/dart/resolution/top_level_variable_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/top_level_variable_test.dart
@@ -80,7 +80,7 @@
     staticType: String?
     typeArgumentTypes
       String
-  declaredElement: <thisLibrary>::<definingUnit>::@variable::x
+  declaredElement: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
@@ -145,7 +145,7 @@
     staticType: String?
     typeArgumentTypes
       String
-  declaredElement: <thisLibrary>::<definingUnit>::@variable::x
+  declaredElement: <thisLibrary>::<definingUnit>::@topLevelVariable::x
 ''');
   }
 
diff --git a/pkg/analyzer/test/src/summary/element_text.dart b/pkg/analyzer/test/src/summary/element_text.dart
index 146f0c3..81116be 100644
--- a/pkg/analyzer/test/src/summary/element_text.dart
+++ b/pkg/analyzer/test/src/summary/element_text.dart
@@ -59,7 +59,6 @@
   bool withNonSynthetic = false;
   bool withPropertyLinking = false;
   bool withRedirectedConstructors = false;
-  bool withReferences = false;
   bool withReturnType = true;
   bool withSyntheticDartCoreImport = false;
 
@@ -1368,10 +1367,6 @@
   }
 
   void _writeReference(ElementImpl e) {
-    if (!configuration.withReferences) {
-      return;
-    }
-
     if (e.reference case var reference?) {
       _sink.writeIndentedLine(() {
         _sink.write('reference: ');
diff --git a/pkg/analyzer/test/src/summary/elements_test.dart b/pkg/analyzer/test/src/summary/elements_test.dart
index f14a8c7..8ec6855 100644
--- a/pkg/analyzer/test/src/summary/elements_test.dart
+++ b/pkg/analyzer/test/src/summary/elements_test.dart
@@ -74,7 +74,6 @@
 import augment 'a.dart';
 ''');
 
-    configuration.withReferences = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -136,14 +135,18 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           const @43
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           fields
@@ -154,14 +157,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             fields
               static const foo @66
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@field::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -171,6 +178,7 @@
                     staticType: int
             accessors
               synthetic static get foo @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getter::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: int
 ''');
@@ -191,14 +199,18 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           fields
@@ -209,14 +221,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             fields
               static const foo @66
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@field::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -226,6 +242,7 @@
                     staticType: int
             accessors
               synthetic static get foo @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getter::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: int
 ''');
@@ -248,14 +265,18 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           const @43
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           fields
@@ -266,14 +287,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             fields
               final foo @59
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@field::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -283,6 +308,7 @@
                     staticType: int
             accessors
               synthetic get foo @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getter::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: int
 ''');
@@ -303,14 +329,18 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           fields
@@ -321,19 +351,24 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             fields
               final foo @59
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@field::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
             accessors
               synthetic get foo @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getter::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: int
 ''');
@@ -383,66 +418,88 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @58
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a1.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           constructors
             <thisLibrary>::<definingUnit>::@class::A::@constructor::new
   augmentationImports
     package:test/a1.dart
+      reference: <thisLibrary>::@augmentation::package:test/a1.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a1.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a1.dart
         classes
           augment class A @97
+            reference: <thisLibrary>::@augmentation::package:test/a1.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a1.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             augmentation: <thisLibrary>::@augmentation::package:test/a11.dart::@classAugmentation::A
       augmentationImports
         package:test/a11.dart
+          reference: <thisLibrary>::@augmentation::package:test/a11.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/a11.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/a11.dart
             classes
               augment class A @41
+                reference: <thisLibrary>::@augmentation::package:test/a11.dart::@classAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a11.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a1.dart::@classAugmentation::A
                 augmentation: <thisLibrary>::@augmentation::package:test/a12.dart::@classAugmentation::A
         package:test/a12.dart
+          reference: <thisLibrary>::@augmentation::package:test/a12.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/a12.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/a12.dart
             classes
               augment class A @41
+                reference: <thisLibrary>::@augmentation::package:test/a12.dart::@classAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a12.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a11.dart::@classAugmentation::A
                 augmentation: <thisLibrary>::@augmentation::package:test/a2.dart::@classAugmentation::A
     package:test/a2.dart
+      reference: <thisLibrary>::@augmentation::package:test/a2.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a2.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a2.dart
         classes
           augment class A @97
+            reference: <thisLibrary>::@augmentation::package:test/a2.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a2.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a12.dart::@classAugmentation::A
             augmentation: <thisLibrary>::@augmentation::package:test/a21.dart::@classAugmentation::A
       augmentationImports
         package:test/a21.dart
+          reference: <thisLibrary>::@augmentation::package:test/a21.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/a21.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/a21.dart
             classes
               augment class A @41
+                reference: <thisLibrary>::@augmentation::package:test/a21.dart::@classAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a21.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a2.dart::@classAugmentation::A
                 augmentation: <thisLibrary>::@augmentation::package:test/a22.dart::@classAugmentation::A
         package:test/a22.dart
+          reference: <thisLibrary>::@augmentation::package:test/a22.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/a22.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/a22.dart
             classes
               augment class A @41
+                reference: <thisLibrary>::@augmentation::package:test/a22.dart::@classAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a22.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a21.dart::@classAugmentation::A
   exportedReferences
@@ -473,7 +530,6 @@
 import augment 'a.dart';
 ''');
 
-    configuration.withReferences = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -553,27 +609,36 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class B @31
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @68
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             methods
               foo1 @79
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@method::foo1
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: void
             augmented
@@ -584,14 +649,18 @@
                 <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A::@method::foo2
       augmentationImports
         package:test/b.dart
+          reference: <thisLibrary>::@augmentation::package:test/b.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/b.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             classes
               augment class A @40
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 methods
                   foo2 @51
+                    reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A::@method::foo2
                     enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
                     returnType: void
 ''');
@@ -614,22 +683,28 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           foo @41
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: true
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _foo @-1
@@ -645,14 +720,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             constructors
               augment foo @59
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 periodOffset: 58
                 nameEnd: 62
@@ -677,18 +756,23 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         accessors
           get foo @45
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
         augmented
@@ -700,14 +784,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@getter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             constructors
               augment foo @59
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 periodOffset: 58
                 nameEnd: 62
@@ -732,14 +820,18 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         methods
           foo @42
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
         augmented
@@ -749,14 +841,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@method::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             constructors
               augment foo @59
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 periodOffset: 58
                 nameEnd: 62
@@ -781,18 +877,23 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         accessors
           set foo= @41
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _ @49
@@ -807,14 +908,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             constructors
               augment foo @59
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 periodOffset: 58
                 nameEnd: 62
@@ -837,10 +942,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         augmented
@@ -848,14 +956,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@constructor::named
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             constructors
               named @51
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@constructor::named
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 periodOffset: 50
                 nameEnd: 56
@@ -877,10 +989,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T1 @33
@@ -893,10 +1008,13 @@
               augmentationSubstitution: {T2: T1}
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @45
@@ -904,6 +1022,7 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             constructors
               named @55
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@constructor::named
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 periodOffset: 54
                 nameEnd: 60
@@ -930,14 +1049,18 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           @37
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           constructors
@@ -945,14 +1068,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@constructor::named
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             constructors
               named @51
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@constructor::named
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 periodOffset: 50
                 nameEnd: 56
@@ -974,10 +1101,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         augmented
@@ -985,14 +1115,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@constructor::new
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             constructors
               @49
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
 ''');
   }
@@ -1014,14 +1148,18 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           named @39
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 38
             nameEnd: 44
@@ -1031,14 +1169,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@constructor::named
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             constructors
               @49
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
 ''');
   }
@@ -1060,18 +1202,23 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           final f @47
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
         augmented
@@ -1083,14 +1230,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@getter::f
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             constructors
               named @51
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@constructor::named
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 periodOffset: 50
                 nameEnd: 56
@@ -1118,18 +1269,23 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           final f @47
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
         augmented
@@ -1141,14 +1297,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@getter::f
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             constructors
               const named @57
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@constructor::named
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 periodOffset: 56
                 nameEnd: 62
@@ -1183,14 +1343,18 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           foo @39
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 38
             nameEnd: 42
@@ -1201,14 +1365,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@constructor::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             fields
               augment foo @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -1235,14 +1403,18 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           foo @41
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -1252,14 +1424,17 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _foo @-1
@@ -1277,14 +1452,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             fields
               augment foo @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -1319,14 +1498,18 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @56
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           foo @66
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -1336,14 +1519,17 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _foo @-1
@@ -1361,15 +1547,19 @@
             <thisLibrary>::<definingUnit>::@class::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
             fields
               augment foo @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -1377,14 +1567,18 @@
                 augmentationTarget: <thisLibrary>::<definingUnit>::@class::A::@field::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             fields
               augment foo @61
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -1419,14 +1613,18 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @56
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           foo @66
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -1436,15 +1634,18 @@
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
             id: getter_0
             variable: field_0
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _foo @-1
@@ -1462,29 +1663,37 @@
             <thisLibrary>::<definingUnit>::@class::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: int
                 id: getter_1
                 variable: field_0
                 augmentationTarget: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             fields
               augment foo @61
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -1519,14 +1728,18 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @56
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           foo @66
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -1536,14 +1749,17 @@
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _foo @-1
@@ -1562,15 +1778,19 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
             accessors
               augment set foo= @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 parameters
                   requiredPositional _ @69
@@ -1580,14 +1800,18 @@
                 variable: field_0
                 augmentationTarget: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             fields
               augment foo @61
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -1614,14 +1838,18 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           static const foo @54
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -1632,9 +1860,11 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
         augmented
@@ -1646,14 +1876,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@getter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             fields
               augment static const foo @75
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -1687,14 +1921,18 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           foo @41
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -1704,14 +1942,17 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _foo @-1
@@ -1729,14 +1970,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             fields
               augment foo @64
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 type: double
                 shouldUseTypeForInitializerInference: true
@@ -1763,14 +2008,18 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           final foo @47
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -1781,9 +2030,11 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
         constructors
           const @64
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
         augmented
@@ -1795,14 +2046,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@getter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             fields
               augment final foo @67
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -1843,14 +2098,18 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             id: field_0
@@ -1858,9 +2117,11 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           get foo @45
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
             id: getter_0
@@ -1874,14 +2135,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@getter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             fields
               augment foo @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -1908,17 +2173,22 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           foo @42
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
         augmented
@@ -1930,14 +2200,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@method::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             fields
               augment foo @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -1966,14 +2240,18 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             id: field_0
@@ -1981,9 +2259,11 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           set foo= @41
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _ @49
@@ -2000,14 +2280,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             fields
               augment foo @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -2034,14 +2318,18 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           foo1 @41
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -2050,14 +2338,17 @@
             setter: setter_0
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic set foo1= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _foo1 @-1
@@ -2078,14 +2369,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@setter::foo2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             fields
               foo2 @53
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -2094,11 +2389,13 @@
                 setter: setter_1
             accessors
               synthetic get foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: int
                 id: getter_1
                 variable: field_1
               synthetic set foo2= @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@setter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 parameters
                   requiredPositional _foo2 @-1
@@ -2127,10 +2424,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T1 @33
@@ -2138,6 +2438,7 @@
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           foo1 @44
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: T1
             id: field_0
@@ -2145,14 +2446,17 @@
             setter: setter_0
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: T1
             id: getter_0
             variable: field_0
           synthetic set foo1= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _foo1 @-1
@@ -2179,10 +2483,13 @@
               augmentationSubstitution: {T2: T1}
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @45
@@ -2190,6 +2497,7 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             fields
               foo2 @56
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 type: T2
                 id: field_1
@@ -2197,11 +2505,13 @@
                 setter: setter_1
             accessors
               synthetic get foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: T2
                 id: getter_1
                 variable: field_1
               synthetic set foo2= @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@setter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 parameters
                   requiredPositional _foo2 @-1
@@ -2229,14 +2539,18 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           @37
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional final this.foo @44
@@ -2251,18 +2565,23 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             fields
               final foo @59
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@field::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 type: int
             accessors
               synthetic get foo @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getter::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: int
 ''');
@@ -2285,14 +2604,18 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           const @43
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             constantInitializers
               ConstructorFieldInitializer
@@ -2313,18 +2636,23 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             fields
               final foo @59
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@field::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 type: int
             accessors
               synthetic get foo @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getter::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: int
 ''');
@@ -2348,14 +2676,18 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           foo @39
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 38
             nameEnd: 42
@@ -2366,14 +2698,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: int
                 id: getter_0
@@ -2400,17 +2736,22 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           foo @42
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
         augmented
@@ -2422,14 +2763,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@method::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: int
                 id: getter_0
@@ -2456,23 +2801,29 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             id: field_0
             setter: setter_0
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           set foo= @41
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _ @49
@@ -2490,14 +2841,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: int
                 id: getter_0
@@ -2524,23 +2879,29 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             id: field_0
             getter: getter_0
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           get foo1 @45
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
             id: getter_0
@@ -2556,20 +2917,25 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getter::foo2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             fields
               synthetic foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 type: int
                 id: field_1
                 getter: getter_1
             accessors
               get foo2 @57
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: int
                 id: getter_1
@@ -2595,10 +2961,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T1 @33
@@ -2606,15 +2975,18 @@
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: T1
             id: field_0
             getter: getter_0
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           abstract get foo1 @48
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: T1
             id: getter_0
@@ -2634,10 +3006,13 @@
               augmentationSubstitution: {T2: T1}
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @45
@@ -2645,12 +3020,14 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             fields
               synthetic foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 type: T2
                 id: field_1
                 getter: getter_1
             accessors
               abstract get foo2 @60
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: T2
                 id: getter_1
@@ -2676,14 +3053,18 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           foo @41
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -2692,15 +3073,18 @@
             setter: setter_0
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
             id: getter_0
             variable: field_0
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _foo @-1
@@ -2718,14 +3102,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: int
                 id: getter_1
@@ -2760,14 +3148,18 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @56
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           foo @66
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -2776,15 +3168,18 @@
             setter: setter_0
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
             id: getter_0
             variable: field_0
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _foo @-1
@@ -2802,15 +3197,19 @@
             <thisLibrary>::<definingUnit>::@class::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: int
                 id: getter_1
@@ -2818,14 +3217,18 @@
                 augmentationTarget: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A::@getterAugmentation::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
                 returnType: int
                 id: getter_2
@@ -2853,34 +3256,42 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             id: field_0
             getter: getter_0
           synthetic foo2 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             id: field_1
             getter: getter_1
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           get foo1 @45
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
             id: getter_0
             variable: field_0
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo1
           get foo2 @66
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
             id: getter_1
@@ -2896,14 +3307,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@getter::foo2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             accessors
               augment get foo1 @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo1
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: int
                 id: getter_2
@@ -2928,9 +3343,7 @@
 }
 ''');
 
-    configuration
-      ..withReferences = true
-      ..withPropertyLinking = true;
+    configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -3024,23 +3437,29 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @56
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             id: field_0
             getter: getter_0
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           get foo @70
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
             id: getter_0
@@ -3055,15 +3474,19 @@
             <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A::@getterAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: int
                 id: getter_1
@@ -3071,14 +3494,18 @@
                 augmentationTarget: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A::@getterAugmentation::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
                 returnType: int
                 id: getter_2
@@ -3105,10 +3532,13 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         augmented
@@ -3116,14 +3546,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: int
                 id: getter_0
@@ -3146,16 +3580,20 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         interfaces
           I1
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           interfaces
@@ -3164,24 +3602,31 @@
           constructors
             <thisLibrary>::<definingUnit>::@class::A::@constructor::new
       class I1 @56
+        reference: <thisLibrary>::<definingUnit>::@class::I1
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I1
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             interfaces
               I2
           class I2 @68
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
 ''');
   }
@@ -3208,16 +3653,20 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         interfaces
           I1
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           interfaces
@@ -3227,40 +3676,52 @@
           constructors
             <thisLibrary>::<definingUnit>::@class::A::@constructor::new
       class I1 @56
+        reference: <thisLibrary>::<definingUnit>::@class::I1
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I1
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @68
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
             interfaces
               I2
           class I2 @93
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
       augmentationImports
         package:test/b.dart
+          reference: <thisLibrary>::@augmentation::package:test/b.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/b.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             classes
               augment class A @40
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 interfaces
                   I3
               class I3 @65
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@class::I3
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 constructors
                   synthetic @-1
+                    reference: <thisLibrary>::@augmentation::package:test/b.dart::@class::I3::@constructor::new
                     enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@class::I3
 ''');
   }
@@ -3280,10 +3741,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @33
@@ -3293,6 +3757,7 @@
           I1
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           interfaces
@@ -3301,16 +3766,21 @@
           constructors
             <thisLibrary>::<definingUnit>::@class::A::@constructor::new
       class I1 @59
+        reference: <thisLibrary>::<definingUnit>::@class::I1
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I1
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @45
@@ -3319,12 +3789,14 @@
             interfaces
               I2<T2>
           class I2 @76
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant E @79
                 defaultType: dynamic
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
 ''');
   }
@@ -3344,10 +3816,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @33
@@ -3357,6 +3832,7 @@
           I1
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           interfaces
@@ -3364,16 +3840,21 @@
           constructors
             <thisLibrary>::<definingUnit>::@class::A::@constructor::new
       class I1 @59
+        reference: <thisLibrary>::<definingUnit>::@class::I1
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I1
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @45
@@ -3384,12 +3865,14 @@
             interfaces
               I2<T2>
           class I2 @80
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant E @83
                 defaultType: dynamic
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
 ''');
   }
@@ -3411,14 +3894,18 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           foo @39
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 38
             nameEnd: 42
@@ -3429,14 +3916,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             methods
               augment foo @62
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: void
                 augmentationTargetAny: <thisLibrary>::<definingUnit>::@class::A::@constructor::foo
@@ -3460,25 +3951,32 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           foo @41
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: true
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _foo @-1
@@ -3496,14 +3994,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             methods
               augment foo @62
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: void
                 augmentationTargetAny: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
@@ -3527,21 +4029,27 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           get foo @45
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
         augmented
@@ -3555,14 +4063,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             methods
               augment foo @62
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: void
                 augmentationTargetAny: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
@@ -3586,21 +4098,27 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           set foo= @41
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _ @49
@@ -3617,14 +4135,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             methods
               augment foo @62
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: void
                 augmentationTargetAny: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
@@ -3648,17 +4170,22 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           foo @42
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
         augmented
@@ -3669,14 +4196,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@method::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             methods
               bar @54
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@method::bar
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: void
 ''');
@@ -3697,14 +4228,18 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           constructors
@@ -3713,14 +4248,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@method::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             methods
               foo @54
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@method::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 parameters
                   optionalPositional default x @63
@@ -3751,21 +4290,27 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           foo1 @42
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo1
           foo2 @59
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
         augmented
@@ -3776,14 +4321,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@method::foo2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             methods
               augment foo1 @62
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo1
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: void
                 augmentationTarget: <thisLibrary>::<definingUnit>::@class::A::@method::foo1
@@ -3806,7 +4355,6 @@
 }
 ''');
 
-    configuration.withReferences = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -3877,7 +4425,6 @@
 }
 ''');
 
-    configuration.withReferences = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -3961,17 +4508,22 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           foo @42
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
@@ -3982,29 +4534,37 @@
             <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A::@methodAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @68
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
             methods
               augment foo @87
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: void
                 augmentationTarget: <thisLibrary>::<definingUnit>::@class::A::@method::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A::@methodAugmentation::foo
       augmentationImports
         package:test/b.dart
+          reference: <thisLibrary>::@augmentation::package:test/b.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/b.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             classes
               augment class A @40
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 methods
                   augment foo @59
+                    reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A::@methodAugmentation::foo
                     enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
                     returnType: void
                     augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
@@ -4028,10 +4588,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @33
@@ -4039,9 +4602,11 @@
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           foo @42
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: T
         augmented
@@ -4054,10 +4619,13 @@
             <thisLibrary>::<definingUnit>::@class::A::@method::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @45
@@ -4065,6 +4633,7 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             methods
               bar @56
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@method::bar
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: T2
 ''');
@@ -4087,10 +4656,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @33
@@ -4098,9 +4670,11 @@
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           foo @42
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: T
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
@@ -4113,10 +4687,13 @@
               augmentationSubstitution: {T2: T}
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @45
@@ -4124,6 +4701,7 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             methods
               augment foo @64
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: T2
                 augmentationTarget: <thisLibrary>::<definingUnit>::@class::A::@method::foo
@@ -4145,10 +4723,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         supertype: Object
@@ -4156,6 +4737,7 @@
           M1
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           mixins
@@ -4165,21 +4747,26 @@
             <thisLibrary>::<definingUnit>::@class::A::@constructor::new
     mixins
       mixin M1 @50
+        reference: <thisLibrary>::<definingUnit>::@mixin::M1
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             mixins
               M2
         mixins
           mixin M2 @62
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixin::M2
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             superclassConstraints
               Object
@@ -4209,18 +4796,23 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class B @56
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant S @58
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
       class A @70
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T1 @72
@@ -4231,6 +4823,7 @@
           M1<T1>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
@@ -4244,6 +4837,7 @@
             <thisLibrary>::<definingUnit>::@class::A::@constructor::new
     mixins
       mixin M1 @107
+        reference: <thisLibrary>::<definingUnit>::@mixin::M1
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant U1 @110
@@ -4252,10 +4846,13 @@
           B<U1>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @45
@@ -4266,6 +4863,7 @@
               M2<T2>
         mixins
           mixin M2 @66
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixin::M2
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant U2 @69
@@ -4273,10 +4871,13 @@
             superclassConstraints
               M1<U2>
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             typeParameters
               covariant T3 @45
@@ -4286,6 +4887,7 @@
               M3<T3>
         mixins
           mixin M3 @66
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixin::M3
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             typeParameters
               covariant U3 @69
@@ -4313,14 +4915,18 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           foo @39
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 38
             nameEnd: 42
@@ -4331,14 +4937,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             accessors
               augment set foo= @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 parameters
                   requiredPositional _ @69
@@ -4368,23 +4978,29 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             id: field_0
             getter: getter_0
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           get foo @45
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
             id: getter_0
@@ -4399,14 +5015,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             accessors
               augment set foo= @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 parameters
                   requiredPositional _ @69
@@ -4436,17 +5056,22 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           foo @42
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
         augmented
@@ -4458,14 +5083,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@method::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             accessors
               augment set foo= @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 parameters
                   requiredPositional _ @69
@@ -4495,23 +5124,29 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             id: field_0
             setter: setter_0
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           set foo1= @41
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _ @50
@@ -4530,20 +5165,25 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@setter::foo2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             fields
               synthetic foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 type: int
                 id: field_1
                 setter: setter_1
             accessors
               set foo2= @53
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@setter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 parameters
                   requiredPositional _ @62
@@ -4572,14 +5212,18 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           foo @41
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -4588,14 +5232,17 @@
             setter: setter_0
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _foo @-1
@@ -4614,14 +5261,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             accessors
               augment set foo= @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 parameters
                   requiredPositional _ @69
@@ -4651,10 +5302,13 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         augmented
@@ -4662,14 +5316,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             accessors
               augment set foo= @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 parameters
                   requiredPositional _ @69
@@ -4699,28 +5357,35 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         fields
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             id: field_0
             setter: setter_0
           synthetic foo2 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             id: field_1
             setter: setter_1
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           set foo1= @41
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _ @50
@@ -4730,6 +5395,7 @@
             variable: field_0
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo1
           set foo2= @62
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _ @71
@@ -4748,14 +5414,18 @@
             <thisLibrary>::<definingUnit>::@class::A::@setter::foo2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             accessors
               augment set foo1= @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@setterAugmentation::foo1
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 parameters
                   requiredPositional _ @70
@@ -4788,7 +5458,6 @@
 class A {}
 ''');
 
-    configuration.withReferences = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -4853,7 +5522,6 @@
 class A {}
 ''');
 
-    configuration.withReferences = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -4921,14 +5589,18 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @56
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           named @64
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 63
             nameEnd: 69
@@ -4938,29 +5610,37 @@
             <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A::@constructorAugmentation::named
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
             constructors
               augment named @59
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::named
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 periodOffset: 58
                 nameEnd: 64
                 augmentationTarget: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A::@constructorAugmentation::named
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             constructors
               augment named @59
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A::@constructorAugmentation::named
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::A
                 periodOffset: 58
                 nameEnd: 64
@@ -4985,14 +5665,18 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           named @39
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 38
             nameEnd: 44
@@ -5002,14 +5686,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::named
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             constructors
               augment named @59
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::named
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 periodOffset: 58
                 nameEnd: 64
@@ -5034,14 +5722,18 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           @37
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::new
         augmented
@@ -5049,14 +5741,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::new
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             constructors
               augment @57
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@constructorAugmentation::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 augmentationTarget: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
 ''');
@@ -5085,21 +5781,25 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class B @49
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::B
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: package:test/a.dart::<definingUnit>::@class::A::@constructor::new
         augmented
@@ -5109,14 +5809,18 @@
             <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::B::@method::foo
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         classes
           augment class B @43
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::B
             methods
               foo @49
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::B::@method::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::B
                 parameters
                   requiredPositional a @53
@@ -5148,17 +5852,22 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class B @32
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::B
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         methods
           foo @38
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @42
@@ -5173,16 +5882,19 @@
             <thisLibrary>::<definingUnit>::@class::B::@method::foo
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       imports
         package:test/a.dart
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         libraryImports
           package:test/a.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         classes
           augment class B @60
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::B
             interfaces
@@ -5213,17 +5925,22 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class B @32
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::B
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         methods
           foo @38
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @42
@@ -5238,16 +5955,19 @@
             <thisLibrary>::<definingUnit>::@class::B::@method::foo
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       imports
         package:test/a.dart
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         libraryImports
           package:test/a.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         classes
           augment class B @60
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::B
             mixins
@@ -5280,25 +6000,30 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class B @49
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::B
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: package:test/a.dart::<definingUnit>::@class::A::@constructor::new
         methods
           foo @65
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @69
@@ -5312,14 +6037,18 @@
             <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::B::@methodAugmentation::foo
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         classes
           augment class B @43
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::B
             methods
               augment foo @57
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::B::@methodAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::B
                 parameters
                   requiredPositional a @61
@@ -5348,18 +6077,23 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         methods
           foo @42
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
           bar @58
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::bar
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
         augmented
@@ -5370,10 +6104,13 @@
               augmentationSubstitution: {T: InvalidType}
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T @45
@@ -5381,6 +6118,7 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             methods
               augment foo @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A::@methodAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
                 returnType: void
                 augmentationTarget: <thisLibrary>::<definingUnit>::@class::A::@method::foo
@@ -5400,24 +6138,31 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @40
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           constructors
             <thisLibrary>::<definingUnit>::@class::A::@constructor::new
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment abstract class A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
 ''');
@@ -5436,24 +6181,31 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       base class A @36
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           constructors
             <thisLibrary>::<definingUnit>::@class::A::@constructor::new
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment base class A @48
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
 ''');
@@ -5472,24 +6224,31 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       final class A @37
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           constructors
             <thisLibrary>::<definingUnit>::@class::A::@constructor::new
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment final class A @49
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
 ''');
@@ -5508,24 +6267,31 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       interface class A @41
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           constructors
             <thisLibrary>::<definingUnit>::@class::A::@constructor::new
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment interface class A @53
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
 ''');
@@ -5544,24 +6310,31 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       macro class A @37
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           constructors
             <thisLibrary>::<definingUnit>::@class::A::@constructor::new
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment macro class A @49
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
 ''');
@@ -5580,24 +6353,31 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       mixin class A @37
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           constructors
             <thisLibrary>::<definingUnit>::@class::A::@constructor::new
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment mixin class A @49
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
 ''');
@@ -5616,24 +6396,31 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract sealed class A @38
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           constructors
             <thisLibrary>::<definingUnit>::@class::A::@constructor::new
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment abstract sealed class A @50
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
 ''');
@@ -5648,23 +6435,29 @@
     configuration.withAugmentedWithoutAugmentation = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           I
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           interfaces
             I
       class I @30
+        reference: <thisLibrary>::<definingUnit>::@class::I
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I
         augmented
 ''');
@@ -5679,21 +6472,26 @@
     configuration.withAugmentedWithoutAugmentation = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           M
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           interfaces
             M
     mixins
       mixin M @30
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -5716,10 +6514,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @33
@@ -5728,16 +6529,20 @@
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           constructors
             <thisLibrary>::<definingUnit>::@class::A::@constructor::new
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T @45
@@ -5761,18 +6566,23 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @33
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @45
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T1 @47
@@ -5781,6 +6591,7 @@
         supertype: A<T1>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
@@ -5790,10 +6601,13 @@
             <thisLibrary>::<definingUnit>::@class::B::@constructor::new
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class B @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @45
@@ -5824,25 +6638,33 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @56
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @67
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
       class C @78
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::C
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         augmented
@@ -5850,18 +6672,24 @@
             <thisLibrary>::<definingUnit>::@class::C::@constructor::new
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class C @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::C
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::C
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::C
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         classes
           augment class C @43
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@classAugmentation::C
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::C
 ''');
@@ -5881,10 +6709,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @33
@@ -5893,21 +6724,27 @@
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           constructors
             <thisLibrary>::<definingUnit>::@class::A::@constructor::new
       class B @55
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T @45
@@ -5944,10 +6781,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @20
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -5981,11 +6821,14 @@
             element: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @43
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional o @45
@@ -6003,10 +6846,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @22
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -6030,11 +6876,14 @@
             element: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       class A @33
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @45
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional o @47
@@ -6058,33 +6907,45 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @31
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           class A @60
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::A::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::A
       augmentationImports
         package:test/b.dart
+          reference: <thisLibrary>::@augmentation::package:test/b.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/b.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             classes
               class B @32
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@class::B
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 constructors
                   synthetic @-1
+                    reference: <thisLibrary>::@augmentation::package:test/b.dart::@class::B::@constructor::new
                     enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@class::B
 ''');
   }
@@ -6104,16 +6965,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @33
             defaultType: dynamic
         constructors
           named @42
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 41
             nameEnd: 47
@@ -6122,14 +6987,18 @@
                 type: T
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           class B @35
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             supertype: A<int>
             constructors
               @56
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::B::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::B
                 superConstructor: ConstructorMember
                   base: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
@@ -6152,26 +7021,34 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           named @39
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 38
             nameEnd: 44
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           class B @35
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             supertype: A
             constructors
               @51
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::B::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::B
                 superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
 ''');
@@ -6190,24 +7067,32 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           class B @35
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             supertype: A
             constructors
               @51
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::B::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::B
                 superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
 ''');
@@ -6226,10 +7111,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased notSimplyBounded F @33
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: dynamic Function(C<dynamic>)
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -6238,10 +7126,13 @@
           returnType: dynamic
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           notSimplyBounded class C @35
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::C
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T @37
@@ -6249,6 +7140,7 @@
                 defaultType: dynamic
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::C::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::C
 ''');
   }
@@ -6263,14 +7155,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           notSimplyBounded class C @35
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::C
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T @37
@@ -6278,6 +7175,7 @@
                 defaultType: dynamic
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::C::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::C
 ''');
   }
@@ -6301,23 +7199,29 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       imports
         package:test/a.dart
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         libraryImports
           package:test/a.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         functions
           f @51
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@function::f
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             parameters
               optionalNamed default x @58
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@function::f::@parameter::x
                 type: int
                 constantInitializer
                   PrefixedIdentifier
@@ -6355,26 +7259,33 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       imports
         package:test/a.dart as prefix @48
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       prefixes
         prefix @48
+          reference: <thisLibrary>::@augmentation::package:test/b.dart::@prefix::prefix
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         libraryImports
           package:test/a.dart as prefix @48
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         functions
           f @61
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@function::f
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             parameters
               optionalNamed default x @68
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@function::f::@parameter::x
                 type: int
                 constantInitializer
                   PropertyAccess
@@ -6410,12 +7321,16 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       documentationComment: /// My documentation.
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
 ''');
   }
@@ -6437,20 +7352,25 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       imports
         package:test/a.dart
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         libraryImports
           package:test/a.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         topLevelVariables
           static const b @52
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@topLevelVariable::b
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             type: int
             shouldUseTypeForInitializerInference: false
@@ -6461,6 +7381,7 @@
                 staticType: int
         accessors
           synthetic static get b @-1
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@getter::b
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             returnType: int
 ''');
@@ -6485,20 +7406,25 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       imports
         package:test/a.dart
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         libraryImports
           package:test/a.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         topLevelVariables
           static const b @52
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@topLevelVariable::b
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             type: int
             shouldUseTypeForInitializerInference: false
@@ -6517,6 +7443,7 @@
                 staticType: int
         accessors
           synthetic static get b @-1
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@getter::b
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             returnType: int
 ''');
@@ -6541,20 +7468,25 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       imports
         package:test/a.dart
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         libraryImports
           package:test/a.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         topLevelVariables
           static const a @52
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@topLevelVariable::a
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             type: A
             shouldUseTypeForInitializerInference: false
@@ -6572,6 +7504,7 @@
                 staticType: A
         accessors
           synthetic static get a @-1
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@getter::a
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             returnType: A
 ''');
@@ -6596,23 +7529,29 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       imports
         package:test/a.dart as prefix @48
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       prefixes
         prefix @48
+          reference: <thisLibrary>::@augmentation::package:test/b.dart::@prefix::prefix
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         libraryImports
           package:test/a.dart as prefix @48
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         topLevelVariables
           static const b @62
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@topLevelVariable::b
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             type: int
             shouldUseTypeForInitializerInference: false
@@ -6638,6 +7577,7 @@
                 staticType: int
         accessors
           synthetic static get b @-1
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@getter::b
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             returnType: int
 ''');
@@ -6664,23 +7604,29 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       imports
         package:test/a.dart as prefix @48
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       prefixes
         prefix @48
+          reference: <thisLibrary>::@augmentation::package:test/b.dart::@prefix::prefix
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         libraryImports
           package:test/a.dart as prefix @48
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         functions
           f @74
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@function::f
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             metadata
               Annotation
@@ -6722,23 +7668,29 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       imports
         package:test/a.dart as prefix @48
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       prefixes
         prefix @48
+          reference: <thisLibrary>::@augmentation::package:test/b.dart::@prefix::prefix
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         libraryImports
           package:test/a.dart as prefix @48
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         functions
           f @65
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@function::f
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             returnType: A
 ''');
@@ -6761,25 +7713,31 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       imports
         package:test/a.dart
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         libraryImports
           package:test/a.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         topLevelVariables
           static final b @52
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@topLevelVariable::b
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             type: int
             shouldUseTypeForInitializerInference: false
         accessors
           synthetic static get b @-1
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@getter::b
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             returnType: int
 ''');
@@ -6805,24 +7763,30 @@
     // But the library does not import, so there `A` is unresolved.
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @27
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: InvalidType
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       imports
         package:test/a.dart
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         libraryImports
           package:test/a.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         functions
           f @48
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@function::f
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             returnType: A
 ''');
@@ -6848,24 +7812,30 @@
     // But the augmentation does not import, so there `A` is unresolved.
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     functions
       f @44
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         functions
           f @31
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@function::f
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             returnType: InvalidType
 ''');
@@ -6888,31 +7858,37 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:io
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:io
         enclosingElement: <thisLibrary>::<definingUnit>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       exports
         dart:async
           enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         libraryExports
           dart:async
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       exports
         dart:collection
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         dart:math
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         libraryExports
           dart:collection
@@ -6939,31 +7915,37 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:io
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:io
         enclosingElement: <thisLibrary>::<definingUnit>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       imports
         dart:async
           enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         libraryImports
           dart:async
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       imports
         dart:collection
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         dart:math
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         libraryImports
           dart:collection
@@ -6988,24 +7970,32 @@
     // The augmentation declares `A`, and can it be used in the library.
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @27
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           class A @35
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::A::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::A
         functions
           f @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@function::f
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             returnType: A
 ''');
@@ -7026,24 +8016,32 @@
     // The library declares `A`, and can it be used in the augmentation.
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     functions
       f @38
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         functions
           f @31
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@function::f
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             returnType: A
 ''');
@@ -7053,13 +8051,17 @@
     var library = await buildLibrary('abstract class C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class C @15
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -7068,13 +8070,17 @@
     var library = await buildLibrary('base class C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       base class C @11
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -7083,13 +8089,17 @@
     var library = await buildLibrary('class C { const C(); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @16
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -7098,13 +8108,17 @@
     var library = await buildLibrary('class C { external const C(); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           external const @25
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -7119,13 +8133,17 @@
 }''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @34
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /**\n   * Docs\n   */
 ''');
@@ -7135,13 +8153,17 @@
     var library = await buildLibrary('class C { C.foo(); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           foo @12
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 11
             nameEnd: 15
@@ -7152,10 +8174,13 @@
     var library = await buildLibrary('class C<T, U> { C(); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -7164,6 +8189,7 @@
             defaultType: dynamic
         constructors
           @16
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -7172,13 +8198,17 @@
     var library = await buildLibrary('class C { C(); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @10
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -7187,13 +8217,17 @@
     var library = await buildLibrary('class C { external C(); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           external @19
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -7202,13 +8236,17 @@
     var library = await buildLibrary('class C { factory C() => throw 0; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           factory @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -7218,17 +8256,22 @@
         await buildLibrary('class C { dynamic x; C(dynamic this.x); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           @21
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional final this.x @36
@@ -7236,9 +8279,11 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -7251,17 +8296,22 @@
     var library = await buildLibrary('class C { dynamic x; C(int this.x); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           @21
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional final this.x @32
@@ -7269,9 +8319,11 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -7284,17 +8336,22 @@
     var library = await buildLibrary('class C { dynamic x; C(this.x); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           @21
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional final this.x @28
@@ -7302,9 +8359,11 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -7322,17 +8381,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @16
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           @21
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional final this.x @28
@@ -7343,9 +8407,11 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -7363,17 +8429,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @16
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           @21
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional final this.x @32
@@ -7384,9 +8455,11 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -7404,17 +8477,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           f @23
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic Function()
         constructors
           @28
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional final this.f @43
@@ -7428,9 +8506,11 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::f
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic Function()
           synthetic set f= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _f @-1
@@ -7442,7 +8522,7 @@
   test_class_constructor_field_formal_multiple_matching_fields() async {
     // This is a compile-time error but it should still analyze consistently.
     var library = await buildLibrary('class C { C(this.x); int x; String x; }');
-    configuration.withReferences = true;
+
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -7501,13 +8581,17 @@
     var library = await buildLibrary('class C { C(this.x); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @10
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional final this.x @17
@@ -7520,17 +8604,22 @@
     var library = await buildLibrary('class C { num x; C(dynamic this.x); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: num
         constructors
           @17
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional final this.x @32
@@ -7538,9 +8627,11 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: num
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -7553,17 +8644,22 @@
     var library = await buildLibrary('class C { num x; C(int this.x); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: num
         constructors
           @17
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional final this.x @28
@@ -7571,9 +8667,11 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: num
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -7586,17 +8684,22 @@
     var library = await buildLibrary('class C { num x; C(this.x); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: num
         constructors
           @17
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional final this.x @24
@@ -7604,9 +8707,11 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: num
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -7619,17 +8724,22 @@
     var library = await buildLibrary('class C { var x; C(dynamic this.x); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           @17
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional final this.x @32
@@ -7637,9 +8747,11 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -7652,17 +8764,22 @@
     var library = await buildLibrary('class C { var x; C(int this.x); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           @17
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional final this.x @28
@@ -7670,9 +8787,11 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -7685,17 +8804,22 @@
     var library = await buildLibrary('class C { var x; C(this.x); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           @17
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional final this.x @24
@@ -7703,9 +8827,11 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -7718,27 +8844,35 @@
     var library = await buildLibrary('class C { int x; C({this.x}); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           @17
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               optionalNamed default final this.x @25
+                reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new::@parameter::x
                 type: int
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -7751,20 +8885,26 @@
     var library = await buildLibrary('class C { int x; C({this.x: 42}); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           @17
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               optionalNamed default final this.x @25
+                reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new::@parameter::x
                 type: int
                 constantInitializer
                   IntegerLiteral
@@ -7773,9 +8913,11 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -7788,17 +8930,22 @@
     var library = await buildLibrary('class C { int x; C([this.x]); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           @17
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               optionalPositional default final this.x @25
@@ -7806,9 +8953,11 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -7821,17 +8970,22 @@
     var library = await buildLibrary('class C { int x; C([this.x = 42]); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           @17
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               optionalPositional default final this.x @25
@@ -7843,9 +8997,11 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -7858,10 +9014,13 @@
     var library = await buildLibrary('class C<T, U> {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -7870,6 +9029,7 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -7882,13 +9042,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional x @24
@@ -7921,13 +9085,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional x @24
@@ -7964,17 +9132,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final x @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           const @29
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               ConstructorFieldInitializer
@@ -7988,6 +9161,7 @@
                   staticType: int
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
 ''');
@@ -8004,17 +9178,22 @@
     // It is OK to keep non-constant initializers.
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final x @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           const @29
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               ConstructorFieldInitializer
@@ -8035,10 +9214,12 @@
                   staticType: int
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
     functions
       foo @52
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -8053,17 +9234,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final promotable _f @22
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::_f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           const @34
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               optionalPositional default f @41
@@ -8085,6 +9271,7 @@
                   staticType: int
         accessors
           synthetic get _f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::_f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
 ''');
@@ -8099,17 +9286,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final x @25
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: Object
         constructors
           const @36
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional a @42
@@ -8135,6 +9327,7 @@
                   staticType: (int, int)
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: Object
 ''');
@@ -8149,17 +9342,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final x @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           const @29
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional p @35
@@ -8185,6 +9383,7 @@
                   staticType: int
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
 ''');
@@ -8203,26 +9402,33 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const @21
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @34
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @46
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional x @56
                 type: dynamic
           const f @70
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             periodOffset: 69
             nameEnd: 71
@@ -8276,22 +9482,28 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @18
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional values @33
                 type: List<String>
       class B @50
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           const @72
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             constantInitializers
               SuperConstructorInvocation
@@ -8321,13 +9533,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const aaa @20
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::aaa
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 19
             nameEnd: 23
@@ -8335,10 +9551,12 @@
               requiredPositional p @28
                 type: int
       class C @40
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           const @62
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -8371,21 +9589,27 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const _ @20
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::_
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 19
             nameEnd: 21
       class B @33
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           const @55
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             constantInitializers
               SuperConstructorInvocation
@@ -8414,13 +9638,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const aaa @20
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::aaa
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 19
             nameEnd: 23
@@ -8428,12 +9656,15 @@
               requiredPositional a @24
                 type: dynamic
               optionalNamed default b @32
+                reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::aaa::@parameter::b
                 type: int
       class C @45
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           const @67
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -8476,22 +9707,28 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @18
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional p @24
                 type: int
       class C @36
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           const ccc @60
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::ccc
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 59
             nameEnd: 63
@@ -8519,18 +9756,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @18
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional values @33
                 type: List<String>
           const empty @52
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::empty
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 51
             nameEnd: 57
@@ -8560,13 +9802,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               RedirectingConstructorInvocation
@@ -8588,6 +9834,7 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
             redirectedConstructor: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
           const named @56
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 55
             nameEnd: 61
@@ -8608,13 +9855,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               RedirectingConstructorInvocation
@@ -8644,6 +9895,7 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
             redirectedConstructor: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
           const named @55
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 54
             nameEnd: 60
@@ -8651,6 +9903,7 @@
               requiredPositional a @61
                 type: dynamic
               optionalNamed default b @69
+                reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named::@parameter::b
                 type: int
 ''');
   }
@@ -8664,13 +9917,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const named @20
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 19
             nameEnd: 25
@@ -8689,6 +9946,7 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             redirectedConstructor: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
           const @54
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional a @60
@@ -8710,22 +9968,28 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @22
                 type: Object?
       class B @35
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           @51
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional final super.a @63
@@ -8753,22 +10017,28 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @18
                 type: num
       class B @31
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           @47
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional final super.a @59
@@ -8790,22 +10060,28 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @19
                 type: num?
       class B @32
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           @48
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional final super.a @61
@@ -8821,10 +10097,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional final super.a @13
@@ -8846,34 +10125,46 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredNamed default a @28
+                reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new::@parameter::a
                 type: int
               requiredNamed default b @47
+                reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new::@parameter::b
                 type: double
       class B @61
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           @77
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               optionalNamed default o1 @87
+                reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new::@parameter::o1
                 type: String
               optionalNamed default final super.a @97
+                reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new::@parameter::a
                 type: int
                 superConstructorParameter: <thisLibrary>::<definingUnit>::@class::A::@constructor::new::@parameter::a
               optionalNamed default o2 @107
+                reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new::@parameter::o2
                 type: String
               optionalNamed default final super.b @117
+                reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new::@parameter::b
                 type: double
                 superConstructorParameter: <thisLibrary>::<definingUnit>::@class::A::@constructor::new::@parameter::b
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
@@ -8893,29 +10184,37 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               optionalNamed default a @19
+                reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new::@parameter::a
                 type: int
                 constantInitializer
                   IntegerLiteral
                     literal: 0 @23
                     staticType: int
       class B @37
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           @53
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               optionalNamed default final hasDefaultValue super.a @62
+                reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new::@parameter::a
                 type: int
                 superConstructorParameter: <thisLibrary>::<definingUnit>::@class::A::@constructor::new::@parameter::a
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
@@ -8934,25 +10233,33 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredNamed default a @28
+                reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new::@parameter::a
                 type: int
       class B @42
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           @58
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               optionalNamed default final super.b @67
+                reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new::@parameter::b
                 type: dynamic
                 superConstructorParameter: <null>
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
@@ -8971,25 +10278,32 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @18
                 type: int
       class B @31
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           @47
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               optionalNamed default final super.a @56
+                reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new::@parameter::a
                 type: dynamic
                 superConstructorParameter: <null>
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
@@ -9008,13 +10322,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @18
@@ -9022,10 +10340,12 @@
               requiredPositional b @28
                 type: double
       class B @41
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           @57
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               optionalPositional default o1 @67
@@ -9059,34 +10379,46 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredNamed default a @28
+                reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new::@parameter::a
                 type: int
               requiredNamed default b @47
+                reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new::@parameter::b
                 type: double
       class B @61
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           @77
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredNamed default o1 @101
+                reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new::@parameter::o1
                 type: String
               requiredNamed default final super.a @124
+                reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new::@parameter::a
                 type: int
                 superConstructorParameter: <thisLibrary>::<definingUnit>::@class::A::@constructor::new::@parameter::a
               requiredNamed default o2 @147
+                reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new::@parameter::o2
                 type: String
               requiredNamed default final super.b @170
+                reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new::@parameter::b
                 type: double
                 superConstructorParameter: <thisLibrary>::<definingUnit>::@class::A::@constructor::new::@parameter::b
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
@@ -9106,29 +10438,37 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               optionalNamed default a @19
+                reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new::@parameter::a
                 type: int
                 constantInitializer
                   IntegerLiteral
                     literal: 0 @23
                     staticType: int
       class B @37
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           @53
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredNamed default final super.a @71
+                reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new::@parameter::a
                 type: int
                 superConstructorParameter: <thisLibrary>::<definingUnit>::@class::A::@constructor::new::@parameter::a
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
@@ -9147,13 +10487,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @18
@@ -9161,10 +10505,12 @@
               requiredPositional b @28
                 type: double
       class B @41
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           @57
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional o1 @66
@@ -9199,22 +10545,28 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @21
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @27
                 type: int
       class C @40
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: B
         constructors
           @56
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional final super.a @64
@@ -9222,10 +10574,12 @@
                 superConstructorParameter: <thisLibrary>::<definingUnit>::@class::B::@constructor::new::@parameter::a
             superConstructor: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
       class B @77
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           @93
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional final super.a @101
@@ -9253,22 +10607,28 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @18
                 type: int
       class C @31
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: B<String>
         constructors
           @55
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional final super.a @63
@@ -9280,6 +10640,7 @@
               base: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
               substitution: {T: String}
       class B @76
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @78
@@ -9287,6 +10648,7 @@
         supertype: A
         constructors
           @95
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional final super.a @103
@@ -9306,19 +10668,25 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @18
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           @34
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional final super.a @42
@@ -9340,22 +10708,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredNamed default a @28
+                reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new::@parameter::a
                 type: int
       class B @41
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           @57
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional final super.a @65
@@ -9369,13 +10744,17 @@
     var library = await buildLibrary('class C { C(x, int y); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @10
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional x @12
@@ -9397,24 +10776,31 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           factory @20
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             redirectedConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::named
           _ @39
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::_
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 38
             nameEnd: 40
       class D @52
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: C
         constructors
           named @70
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             periodOffset: 69
             nameEnd: 75
@@ -9434,10 +10820,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -9446,15 +10835,18 @@
             defaultType: dynamic
         constructors
           factory @26
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             redirectedConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::D::@constructor::named
               substitution: {T: U, U: T}
           _ @51
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::_
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 50
             nameEnd: 52
       class D @64
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @66
@@ -9464,6 +10856,7 @@
         supertype: C<U, T>
         constructors
           named @94
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             periodOffset: 93
             nameEnd: 99
@@ -9486,10 +10879,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class B @33
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @35
@@ -9498,15 +10894,18 @@
             defaultType: dynamic
         constructors
           factory @53
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             redirectedConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
               substitution: {T: U, U: T}
           _ @78
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::_
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             periodOffset: 77
             nameEnd: 79
       class C @91
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @93
@@ -9520,11 +10919,13 @@
               T
         constructors
           named @121
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 120
             nameEnd: 126
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         typeParameters
           covariant T @10
             defaultType: dynamic
@@ -9550,22 +10951,27 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @25
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           factory @39
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             redirectedConstructor: package:test/foo.dart::<definingUnit>::@class::D::@constructor::named
           _ @58
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::_
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 57
             nameEnd: 59
@@ -9588,16 +10994,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @25
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @27
@@ -9606,11 +11015,13 @@
             defaultType: dynamic
         constructors
           factory @45
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             redirectedConstructor: ConstructorMember
               base: package:test/foo.dart::<definingUnit>::@class::D::@constructor::named
               substitution: {T: U, U: T}
           _ @70
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::_
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 69
             nameEnd: 71
@@ -9633,25 +11044,31 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo.dart as foo @21
       enclosingElement: <thisLibrary>
   prefixes
     foo @21
+      reference: <thisLibrary>::@prefix::foo
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo.dart as foo @21
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @32
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           factory @46
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             redirectedConstructor: package:test/foo.dart::<definingUnit>::@class::D::@constructor::named
           _ @69
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::_
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 68
             nameEnd: 70
@@ -9674,19 +11091,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo.dart as foo @21
       enclosingElement: <thisLibrary>
   prefixes
     foo @21
+      reference: <thisLibrary>::@prefix::foo
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo.dart as foo @21
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @32
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @34
@@ -9695,11 +11116,13 @@
             defaultType: dynamic
         constructors
           factory @52
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             redirectedConstructor: ConstructorMember
               base: package:test/foo.dart::<definingUnit>::@class::D::@constructor::named
               substitution: {T: U, U: T}
           _ @81
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::_
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 80
             nameEnd: 82
@@ -9714,16 +11137,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant E @8
             defaultType: dynamic
         constructors
           factory @23
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -9737,21 +11164,27 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class D @6
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
       class C @17
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant E @19
             defaultType: dynamic
         constructors
           factory @34
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -9768,24 +11201,31 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           factory @20
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             redirectedConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
           _ @33
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::_
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 32
             nameEnd: 34
       class D @46
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: C
         constructors
           @62
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             superConstructor: <thisLibrary>::<definingUnit>::@class::C::@constructor::_
 ''');
@@ -9803,10 +11243,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -9815,15 +11258,18 @@
             defaultType: dynamic
         constructors
           factory @26
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             redirectedConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
               substitution: {T: U, U: T}
           _ @45
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::_
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 44
             nameEnd: 46
       class D @58
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @60
@@ -9833,6 +11279,7 @@
         supertype: C<U, T>
         constructors
           @86
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::C::@constructor::_
@@ -9853,10 +11300,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class B @33
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @35
@@ -9865,15 +11315,18 @@
             defaultType: dynamic
         constructors
           factory @53
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             redirectedConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
               substitution: {T: U, U: T}
         methods
           abstract B_ @70
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::B_
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: dynamic
       class C @84
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @86
@@ -9883,9 +11336,11 @@
         supertype: B<U, T>
         constructors
           @112
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         typeParameters
           covariant T @10
             defaultType: dynamic
@@ -9911,22 +11366,27 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @25
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           factory @39
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             redirectedConstructor: package:test/foo.dart::<definingUnit>::@class::D::@constructor::new
           _ @52
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::_
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 51
             nameEnd: 53
@@ -9949,16 +11409,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @25
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @27
@@ -9967,11 +11430,13 @@
             defaultType: dynamic
         constructors
           factory @45
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             redirectedConstructor: ConstructorMember
               base: package:test/foo.dart::<definingUnit>::@class::D::@constructor::new
               substitution: {T: U, U: T}
           _ @64
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::_
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 63
             nameEnd: 65
@@ -9995,22 +11460,27 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @25
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           factory @39
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             redirectedConstructor: package:test/foo.dart::<definingUnit>::@class::B::@constructor::new
           _ @52
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::_
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 51
             nameEnd: 53
@@ -10033,25 +11503,31 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo.dart as foo @21
       enclosingElement: <thisLibrary>
   prefixes
     foo @21
+      reference: <thisLibrary>::@prefix::foo
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo.dart as foo @21
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @32
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           factory @46
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             redirectedConstructor: package:test/foo.dart::<definingUnit>::@class::D::@constructor::new
           _ @63
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::_
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 62
             nameEnd: 64
@@ -10074,19 +11550,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo.dart as foo @21
       enclosingElement: <thisLibrary>
   prefixes
     foo @21
+      reference: <thisLibrary>::@prefix::foo
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo.dart as foo @21
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @32
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @34
@@ -10095,11 +11575,13 @@
             defaultType: dynamic
         constructors
           factory @52
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             redirectedConstructor: ConstructorMember
               base: package:test/foo.dart::<definingUnit>::@class::D::@constructor::new
               substitution: {T: U, U: T}
           _ @75
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::_
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 74
             nameEnd: 76
@@ -10123,25 +11605,31 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo.dart as foo @21
       enclosingElement: <thisLibrary>
   prefixes
     foo @21
+      reference: <thisLibrary>::@prefix::foo
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo.dart as foo @21
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @32
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           factory @46
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             redirectedConstructor: package:test/foo.dart::<definingUnit>::@class::B::@constructor::new
           _ @63
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::_
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 62
             nameEnd: 64
@@ -10156,16 +11644,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant E @8
             defaultType: dynamic
         constructors
           factory @23
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -10183,28 +11675,36 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class B @21
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           factory @35
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             redirectedConstructor: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
           _ @48
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::_
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             periodOffset: 47
             nameEnd: 49
       class C @61
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: B
         constructors
           @77
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: <thisLibrary>::<definingUnit>::@class::B::@constructor::_
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         aliasedType: C
 ''');
   }
@@ -10218,17 +11718,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const named @20
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 19
             nameEnd: 25
           const @37
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               RedirectingConstructorInvocation
@@ -10255,20 +11760,25 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const named @23
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 22
             nameEnd: 28
           const @40
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               RedirectingConstructorInvocation
@@ -10295,17 +11805,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           named @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 13
             nameEnd: 19
           @25
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             redirectedConstructor: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
 ''');
@@ -10320,15 +11835,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
           const named @33
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 32
             nameEnd: 38
@@ -10352,18 +11872,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const @21
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
           const named @36
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 35
             nameEnd: 41
@@ -10387,15 +11912,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
           named @21
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 20
             nameEnd: 26
@@ -10414,16 +11944,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           named @17
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 16
             nameEnd: 22
@@ -10431,10 +11965,12 @@
               requiredPositional a @25
                 type: T
       class B @37
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A<int>
         constructors
           @58
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
@@ -10453,21 +11989,27 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           named @14
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 13
             nameEnd: 19
       class B @31
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           @47
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
 ''');
@@ -10482,19 +12024,25 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @17
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           @33
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
 ''');
@@ -10509,19 +12057,25 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @17
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           @33
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
 ''');
@@ -10534,19 +12088,25 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @17
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
 ''');
@@ -10557,13 +12117,17 @@
     configuration.withDisplayName = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             displayName: C
 ''');
@@ -10582,17 +12146,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final x @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           const @29
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               ConstructorFieldInitializer
@@ -10615,16 +12184,20 @@
                   staticType: D
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
       class D @58
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final x @70
+            reference: <thisLibrary>::<definingUnit>::@class::D::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             type: dynamic
         constructors
           const @81
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             constantInitializers
               ConstructorFieldInitializer
@@ -10647,6 +12220,7 @@
                   staticType: C
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             returnType: dynamic
 ''');
@@ -10665,33 +12239,43 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final x @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           @23
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
       class D @50
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final x @62
+            reference: <thisLibrary>::<definingUnit>::@class::D::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             type: dynamic
         constructors
           @67
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             returnType: dynamic
 ''');
@@ -10706,13 +12290,17 @@
     configuration.withDisplayName = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           foo @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             displayName: C.foo
             periodOffset: 13
@@ -10729,13 +12317,17 @@
     configuration.withDisplayName = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             displayName: C
 ''');
@@ -10750,13 +12342,17 @@
     configuration.withDisplayName = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             displayName: C
             periodOffset: 13
@@ -10772,14 +12368,18 @@
 class C {}''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @22
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /**\n * Docs\n */
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -10824,38 +12424,50 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @36
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /**\n * bbb\n */
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @79
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// bbb\n/// ccc
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
       class C @122
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /**\n * ccc\n */
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       class D @173
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// ddd
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
       class E @207
+        reference: <thisLibrary>::<definingUnit>::@class::E
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /**\n * aaa\n */
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
 ''');
   }
@@ -10868,14 +12480,18 @@
 class C {}''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @37
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// first\n/// second\n/// third
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -10891,24 +12507,32 @@
 class E {}''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @47
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /**\n * Docs referring to [D] and [E]\n */
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       class D @59
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
       class E @70
+        reference: <thisLibrary>::<definingUnit>::@class::E
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
 ''');
   }
@@ -10917,14 +12541,18 @@
     var library = await buildLibrary('/**\r\n * Docs\r\n */\r\nclass C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @25
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /**\n * Docs\n */
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -10938,14 +12566,18 @@
 class C {}''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @66
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /**\n * Docs\n */
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -10984,10 +12616,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class BeforeMeta @48
+        reference: <thisLibrary>::<definingUnit>::@class::BeforeMeta
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 1\n/// Comment 2
         metadata
@@ -11003,8 +12638,10 @@
             element: <thisLibrary>::<definingUnit>::@class::Annotation::@constructor::new
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::BeforeMeta::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::BeforeMeta
       class BeforeMetaNamed @117
+        reference: <thisLibrary>::<definingUnit>::@class::BeforeMetaNamed
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 1\n/// Comment 2
         metadata
@@ -11028,8 +12665,10 @@
             element: <thisLibrary>::<definingUnit>::@class::Annotation::@constructor::named
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::BeforeMetaNamed::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::BeforeMetaNamed
       class AfterMeta @185
+        reference: <thisLibrary>::<definingUnit>::@class::AfterMeta
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 1\n/// Comment 2
         metadata
@@ -11045,8 +12684,10 @@
             element: <thisLibrary>::<definingUnit>::@class::Annotation::@constructor::new
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::AfterMeta::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::AfterMeta
       class AroundMeta @247
+        reference: <thisLibrary>::<definingUnit>::@class::AroundMeta
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 2
         metadata
@@ -11062,8 +12703,10 @@
             element: <thisLibrary>::<definingUnit>::@class::Annotation::@constructor::new
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::AroundMeta::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::AroundMeta
       class DocBeforeMetaNotDocAfter @319
+        reference: <thisLibrary>::<definingUnit>::@class::DocBeforeMetaNotDocAfter
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Doc comment.
         metadata
@@ -11079,13 +12722,17 @@
             element: <thisLibrary>::<definingUnit>::@class::Annotation::@constructor::new
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::DocBeforeMetaNotDocAfter::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::DocBeforeMetaNotDocAfter
       class Annotation @354
+        reference: <thisLibrary>::<definingUnit>::@class::Annotation
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @375
+            reference: <thisLibrary>::<definingUnit>::@class::Annotation::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::Annotation
           const named @408
+            reference: <thisLibrary>::<definingUnit>::@class::Annotation::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::Annotation
             periodOffset: 407
             nameEnd: 413
@@ -11100,23 +12747,30 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class C @15
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           abstract i @34
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic abstract get i @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic abstract set i= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _i @-1
@@ -11129,13 +12783,17 @@
     var library = await buildLibrary('class C { static const int i = 0; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static const i @27
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: true
@@ -11145,9 +12803,11 @@
                 staticType: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic static get i @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -11158,13 +12818,17 @@
         await buildLibrary('class C { static late const int i = 0; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static late const i @32
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: true
@@ -11174,9 +12838,11 @@
                 staticType: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic static get i @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -11189,23 +12855,30 @@
 }''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           covariant x @26
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional covariant _x @-1
@@ -11224,24 +12897,31 @@
 }''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @38
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /**\n   * Docs\n   */
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -11260,13 +12940,17 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           foo @16
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: true
@@ -11274,20 +12958,24 @@
             getter: getter_0
             setter: setter_0
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             id: field_1
             getter: getter_1
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::foo::@def::0
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
             id: getter_0
             variable: field_0
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _foo @-1
@@ -11296,6 +12984,7 @@
             id: setter_0
             variable: field_0
           get foo @35
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::foo::@def::1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
             id: getter_1
@@ -11313,13 +13002,17 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           foo @16
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: true
@@ -11327,20 +13020,24 @@
             getter: getter_0
             setter: setter_0
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             id: field_1
             setter: setter_1
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
             id: getter_0
             variable: field_0
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::foo::@def::0
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _foo @-1
@@ -11349,6 +13046,7 @@
             id: setter_0
             variable: field_0
           set foo= @31
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::foo::@def::1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _ @39
@@ -11367,23 +13065,30 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class C @15
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           external i @34
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get i @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set i= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _i @-1
@@ -11401,13 +13106,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final x @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: false
@@ -11417,9 +13126,11 @@
                 staticType: int
         constructors
           const @34
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -11437,21 +13148,27 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const @21
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @34
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final f @46
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: A<int Function(double)>
             shouldUseTypeForInitializerInference: false
@@ -11501,9 +13218,11 @@
                 staticType: A<int Function(double)>
         constructors
           const @93
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: A<int Function(double)>
 ''');
@@ -11517,21 +13236,27 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final x @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -11548,13 +13273,17 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final foo @22
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             id: field_0
@@ -11562,6 +13291,7 @@
             setter: setter_0
         constructors
           @29
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional final this.foo @36
@@ -11569,11 +13299,13 @@
                 field: <thisLibrary>::<definingUnit>::@class::A::@field::foo
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
             id: getter_0
             variable: field_0
           set foo= @48
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional newValue @56
@@ -11589,18 +13321,23 @@
         ' abstract class D { int get v; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: D
         fields
           v @24
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           @27
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional final this.v @34
@@ -11609,25 +13346,31 @@
             superConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
         accessors
           synthetic get v @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set v= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _v @-1
                 type: int
             returnType: void
       abstract class D @55
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic v @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
         accessors
           abstract get v @67
+            reference: <thisLibrary>::<definingUnit>::@class::D::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             returnType: int
 ''');
@@ -11637,23 +13380,30 @@
     var library = await buildLibrary('class C { var x; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -11666,23 +13416,30 @@
     var library = await buildLibrary('class C { late var x; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           late x @19
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -11695,24 +13452,31 @@
     var library = await buildLibrary('class C { num v = 0; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           v @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: num
             shouldUseTypeForInitializerInference: true
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get v @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: num
           synthetic set v= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _v @-1
@@ -11725,24 +13489,31 @@
     var library = await buildLibrary('class C { var v = 0; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           v @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get v @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set v= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _v @-1
@@ -11756,41 +13527,52 @@
         'class C extends D { var v; } abstract class D { int get v; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: D
         fields
           v @24
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
         accessors
           synthetic get v @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set v= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _v @-1
                 type: int
             returnType: void
       abstract class D @44
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic v @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
         accessors
           abstract get v @56
+            reference: <thisLibrary>::<definingUnit>::@class::D::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             returnType: int
 ''');
@@ -11810,27 +13592,35 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @28
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: List<int>
         constructors
           const @40
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           abstract get f @61
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: List<int>
       class B @72
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         fields
           final f @107
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: List<int>
             shouldUseTypeForInitializerInference: true
@@ -11846,14 +13636,17 @@
                 staticType: List<int>
         constructors
           const @94
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: List<int>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -11863,6 +13656,7 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -11872,24 +13666,31 @@
     var library = await buildLibrary('class C { static var v = 0; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static v @21
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic static set v= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _v @-1
@@ -11911,27 +13712,35 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: double
         constructors
           const @27
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           abstract get foo @45
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: double
       class B @58
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         fields
           final foo @93
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: double
             shouldUseTypeForInitializerInference: true
@@ -11941,10 +13750,12 @@
                 staticType: double
         constructors
           const @80
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: double
 ''');
@@ -11965,13 +13776,17 @@
     configuration.forPromotableFields(classNames: {'A'});
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final _foo @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int?
   fieldNameNonPromotabilityInfo
@@ -11996,13 +13811,17 @@
     configuration.forPromotableFields(classNames: {'A'});
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final promotable _foo @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int?
 ''');
@@ -12027,13 +13846,17 @@
     configuration.forPromotableFields(classNames: {'A'});
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @21
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final _foo @38
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int?
   fieldNameNonPromotabilityInfo
@@ -12058,13 +13881,17 @@
     configuration.forPromotableFields(classNames: {'A'});
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final promotable _foo @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int?
 ''');
@@ -12085,13 +13912,17 @@
     configuration.forPromotableFields(classNames: {'A'});
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final _foo @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int?
   fieldNameNonPromotabilityInfo
@@ -12116,13 +13947,17 @@
     configuration.forPromotableFields(classNames: {'A'});
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final promotable _foo @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int?
 ''');
@@ -12143,13 +13978,17 @@
     configuration.forPromotableFields(classNames: {'A'});
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final promotable _foo @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int?
 ''');
@@ -12167,13 +14006,17 @@
     configuration.forPromotableFields(classNames: {'A'});
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @22
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final _foo @39
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int?
 ''');
@@ -12199,13 +14042,17 @@
     configuration.forPromotableFields(classNames: {'A'});
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final _foo @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int?
   fieldNameNonPromotabilityInfo
@@ -12242,29 +14089,37 @@
     );
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final promotable _foo @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int?
       class B @90
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final promotable _foo @107
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int?
             shouldUseTypeForInitializerInference: true
     mixins
       mixin M @54
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
         fields
           final promotable _foo @71
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             type: int?
             shouldUseTypeForInitializerInference: true
@@ -12297,19 +14152,25 @@
     );
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final promotable _foo @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int?
       class B @54
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final promotable _foo @71
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int?
             shouldUseTypeForInitializerInference: true
@@ -12338,13 +14199,17 @@
     configuration.forPromotableFields(classNames: {'A'});
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final _foo @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int?
   fieldNameNonPromotabilityInfo
@@ -12377,19 +14242,25 @@
     );
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final _foo @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int?
       class B @54
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final _foo @71
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int?
             shouldUseTypeForInitializerInference: true
@@ -12420,13 +14291,17 @@
     configuration.forPromotableFields(classNames: {'A'});
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final _foo @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int?
   fieldNameNonPromotabilityInfo
@@ -12464,19 +14339,23 @@
     );
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @24
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final promotable _foo @41
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int?
 ''');
@@ -12502,13 +14381,17 @@
     configuration.forPromotableFields(classNames: {'A'});
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final _foo @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int?
   fieldNameNonPromotabilityInfo
@@ -12543,22 +14426,28 @@
     );
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final _foo @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int?
     mixins
       mixin M @54
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
         fields
           final _foo @71
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             type: int?
             shouldUseTypeForInitializerInference: true
@@ -12590,13 +14479,17 @@
     );
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final promotable _foo @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int?
 ''');
@@ -12612,13 +14505,17 @@
     configuration.forPromotableFields(classNames: {'A'});
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           _foo @17
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int?
   fieldNameNonPromotabilityInfo
@@ -12638,13 +14535,17 @@
     configuration.forPromotableFields(classNames: {'A'});
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           field @17
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::field
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int?
 ''');
@@ -12663,16 +14564,21 @@
     configuration.forPromotableFields(classNames: {'A'});
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final promotable _foo @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int?
           final bar @37
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::bar
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: false
@@ -12686,13 +14592,17 @@
 }''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static const x @25
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: false
@@ -12702,9 +14612,11 @@
                 staticType: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic static get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -12719,27 +14631,33 @@
 }''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @23
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final b @35
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: double
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get b @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: double
 ''');
@@ -12757,33 +14675,42 @@
 library
   name: lib
   nameOffset: 8
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @34
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final b @46
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: double
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get b @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: double
   parts
     package:test/a.dart
+      reference: <thisLibrary>::@unit::package:test/a.dart
       enclosingElement: <thisLibrary>
       topLevelVariables
         static final a @19
+          reference: <thisLibrary>::@unit::package:test/a.dart::@topLevelVariable::a
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           type: int
           shouldUseTypeForInitializerInference: false
       accessors
         synthetic static get a @-1
+          reference: <thisLibrary>::@unit::package:test/a.dart::@getter::a
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           returnType: int
 ''');
@@ -12796,21 +14723,27 @@
 }''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final x @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -12823,21 +14756,27 @@
 }''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static final x @25
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic static get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -12847,23 +14786,30 @@
     var library = await buildLibrary('class C { static int i; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static i @21
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic static get i @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic static set i= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _i @-1
@@ -12881,21 +14827,27 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static final f @25
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: false
         constructors
           const @40
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic static get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -12905,21 +14857,27 @@
     var library = await buildLibrary('class C { static final x = 0; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static final x @23
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic static get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -12929,23 +14887,30 @@
     var library = await buildLibrary('class C { static late int i; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static late i @26
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic static get i @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic static set i= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _i @-1
@@ -12963,24 +14928,31 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           a @16
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: true
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get a @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set a= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _a @-1
@@ -12998,24 +14970,31 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           foo @16
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _foo @-1
@@ -13037,36 +15016,46 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           abstract get foo @29
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
       class B @43
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         fields
           final foo @65
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int
             shouldUseTypeForInitializerInference: true
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: int
 ''');
@@ -13081,24 +15070,31 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           a @16
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: Never
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get a @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: Never
           synthetic set a= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _a @-1
@@ -13111,24 +15107,31 @@
     var library = await buildLibrary('class C { int x = 0; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: true
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -13141,24 +15144,31 @@
     var library = await buildLibrary('class C { var x = 0; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -13171,35 +15181,45 @@
     var library = await buildLibrary('class C { int i; int j; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           i @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
           j @21
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::j
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get i @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set i= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _i @-1
                 type: int
             returnType: void
           synthetic get j @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::j
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set j= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::j
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _j @-1
@@ -13216,23 +15236,30 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           late foo @21
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _foo @-1
@@ -13249,23 +15276,30 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           late final foo @27
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _foo @-1
@@ -13282,21 +15316,27 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           late final foo @27
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: true
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -13314,35 +15354,45 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           foo @16
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
       class B @37
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         fields
           late f @62
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: int
           synthetic set f= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _f @-1
@@ -13363,39 +15413,50 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           get foo @20
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
       class B @39
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         fields
           late f @64
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: int
           synthetic set f= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _f @-1
@@ -13408,13 +15469,17 @@
     var library = await buildLibrary('final class C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       final class C @12
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -13423,20 +15488,26 @@
     var library = await buildLibrary('abstract class C { int get x; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class C @15
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           abstract get x @27
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -13446,20 +15517,26 @@
     var library = await buildLibrary('class C { external int get x; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           external get x @27
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -13469,20 +15546,26 @@
     var library = await buildLibrary('class C { get x => null; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           get x @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
 ''');
@@ -13498,20 +15581,26 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           get foo @20 invokesSuperSelf
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
 ''');
@@ -13527,20 +15616,26 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           get foo @20 invokesSuperSelf
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
 ''');
@@ -13556,20 +15651,26 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           get foo @20
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
 ''');
@@ -13583,20 +15684,26 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           external get x @20
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -13606,20 +15713,26 @@
     var library = await buildLibrary('class C { static int get x => null; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic static x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           static get x @25
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -13630,26 +15743,34 @@
         await buildLibrary('class C { int get x => null; get y => null; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
           synthetic y @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           get x @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           get y @33
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
 ''');
@@ -13664,23 +15785,30 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           get x @20
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           set x= @39
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional value @45
@@ -13698,26 +15826,33 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           set x= @21
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional value @27
                 type: int
             returnType: void
           get x @47
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -13727,13 +15862,17 @@
     var library = await buildLibrary('interface class C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       interface class C @16
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -13746,26 +15885,34 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           D
           E
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       class D @33
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
       class E @44
+        reference: <thisLibrary>::<definingUnit>::@class::E
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
 ''');
   }
@@ -13780,30 +15927,38 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
       class C @45
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
       class D @56
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
           C
     extensionTypes
       B @26
+        reference: <thisLibrary>::<definingUnit>::@extensionType::B
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::B::@constructor::new
         typeErasure: int
         fields
           final it @32
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             returnType: int
 ''');
@@ -13817,26 +15972,34 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @17
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
       class C @28
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
           B
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -13846,26 +16009,34 @@
         'class C implements X, Y, Z {} class X {} class Z {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           X
           Z
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       class X @36
+        reference: <thisLibrary>::<definingUnit>::@class::X
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
       class Z @47
+        reference: <thisLibrary>::<definingUnit>::@class::Z
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::Z::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::Z
 ''');
   }
@@ -13874,16 +16045,21 @@
     var library = await buildLibrary('abstract class C { f(); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class C @15
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           abstract f @19
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
 ''');
@@ -13898,22 +16074,27 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @27
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           f @40 async
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: Future<dynamic>
 ''');
@@ -13928,22 +16109,27 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @27
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           f @40 async*
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: Stream<dynamic>
 ''');
@@ -13959,16 +16145,21 @@
 }''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           f @34
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /**\n   * Docs\n   */
             returnType: dynamic
@@ -13979,16 +16170,21 @@
     var library = await buildLibrary('class C { external f(); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           external f @19
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
 ''');
@@ -14021,30 +16217,38 @@
         ' abstract class D { void f(int value); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: D
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
         methods
           f @25
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional value @27
                 type: int
             returnType: void
       abstract class D @54
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
         methods
           abstract f @63
+            reference: <thisLibrary>::<definingUnit>::@class::D::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             parameters
               requiredPositional value @69
@@ -14064,27 +16268,35 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: D
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
         methods
           f @22
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
       abstract class D @52
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
         methods
           abstract f @62
+            reference: <thisLibrary>::<definingUnit>::@class::D::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             returnType: int
 ''');
@@ -14100,16 +16312,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           foo @17 invokesSuperSelf
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
 ''');
@@ -14124,23 +16341,30 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @17
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         methods
           A @38
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::A
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: void
 ''');
@@ -14154,16 +16378,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           external m @16
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -14173,16 +16402,21 @@
     var library = await buildLibrary('class C { f(x, y) {} }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           f @10
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional x @12
@@ -14197,16 +16431,21 @@
     var library = await buildLibrary('class C { static f() {} }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           static f @17
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
 ''');
@@ -14222,16 +16461,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           f @26 sync*
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: Iterable<int>
 ''');
@@ -14241,16 +16485,21 @@
     var library = await buildLibrary('class C { T f<T, U>(U u) => null; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           f @12
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             typeParameters
               covariant T @14
@@ -14272,10 +16521,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -14284,9 +16536,11 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           f @20
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             typeParameters
               covariant V @22
@@ -14308,16 +16562,21 @@
     var library = await buildLibrary('class C { void f<T, U>(T x(U u)) {} }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           f @15
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             typeParameters
               covariant T @17
@@ -14338,19 +16597,25 @@
     var library = await buildLibrary('class C { f() {} g() {} }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           f @10
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
           g @17
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::g
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
 ''');
@@ -14360,13 +16625,17 @@
     var library = await buildLibrary('mixin class C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       mixin class C @12
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -14381,10 +16650,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: D
         mixins
@@ -14393,27 +16665,36 @@
           G
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
       class D @40
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
       class E @51
+        reference: <thisLibrary>::<definingUnit>::@class::E
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
       class F @62
+        reference: <thisLibrary>::<definingUnit>::@class::F
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::F::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::F
       class G @73
+        reference: <thisLibrary>::<definingUnit>::@class::G
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::G::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::G
 ''');
   }
@@ -14428,10 +16709,13 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class D @56
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Object
         mixins
@@ -14439,24 +16723,29 @@
           C
     extensionTypes
       B @26
+        reference: <thisLibrary>::<definingUnit>::@extensionType::B
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::B::@constructor::new
         typeErasure: int
         fields
           final it @32
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             returnType: int
     mixins
       mixin A @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
       mixin C @45
+        reference: <thisLibrary>::<definingUnit>::@mixin::C
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -14472,10 +16761,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class Z @6
+        reference: <thisLibrary>::<definingUnit>::@class::Z
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         mixins
@@ -14483,28 +16775,35 @@
           C<double>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::Z::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::Z
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
       class A @50
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @61
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant B1 @63
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
       class C @76
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant C1 @78
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -14516,19 +16815,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @20
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Object
         mixins
           M<dynamic>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -14546,10 +16850,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @30
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @32
@@ -14560,13 +16867,16 @@
           M2
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     mixins
       mixin M1 @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M1
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
       mixin M2 @18
+        reference: <thisLibrary>::<definingUnit>::@mixin::M2
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -14578,10 +16888,13 @@
         'class C extends Object with X, Y, Z {} class X {} class Z {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Object
         mixins
@@ -14589,16 +16902,21 @@
           Z
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       class X @45
+        reference: <thisLibrary>::<definingUnit>::@class::X
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
       class Z @56
+        reference: <thisLibrary>::<definingUnit>::@class::Z
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::Z::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::Z
 ''');
   }
@@ -14610,10 +16928,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -14621,9 +16942,11 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     typeAliases
       notSimplyBounded A @32
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         aliasedType: (C<dynamic>, int)
 ''');
   }
@@ -14637,10 +16960,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -14648,9 +16974,11 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     typeAliases
       functionTypeAliasBased notSimplyBounded F @32
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: dynamic Function(C<dynamic>)
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -14668,10 +16996,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -14679,6 +17010,7 @@
             defaultType: C<dynamic>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -14690,10 +17022,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -14701,8 +17036,10 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       notSimplyBounded class D @30
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @32
@@ -14710,6 +17047,7 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
 ''');
   }
@@ -14721,10 +17059,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       notSimplyBounded C @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::C
         typeParameters
           unrelated T @10
             bound: dynamic
@@ -14733,6 +17074,7 @@
         aliasedElement: GenericFunctionTypeElement
           returnType: void
       notSimplyBounded D @50
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::D
         typeParameters
           unrelated T @52
             bound: dynamic
@@ -14750,16 +17092,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       notSimplyBounded C @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::C
         typeParameters
           covariant T @10
             bound: dynamic
             defaultType: dynamic
         aliasedType: List<T>
       notSimplyBounded D @42
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::D
         typeParameters
           covariant T @44
             bound: dynamic
@@ -14775,10 +17121,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -14786,8 +17135,10 @@
             defaultType: D<dynamic>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       notSimplyBounded class D @30
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @32
@@ -14795,6 +17146,7 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
 ''');
   }
@@ -14806,10 +17158,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -14817,14 +17172,17 @@
             defaultType: D<dynamic>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       class D @33
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @35
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
 ''');
   }
@@ -14838,10 +17196,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -14849,8 +17210,10 @@
             defaultType: D<dynamic>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       notSimplyBounded class D @39
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @41
@@ -14858,6 +17221,7 @@
             defaultType: D<dynamic>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
 ''');
   }
@@ -14868,10 +17232,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -14879,6 +17246,7 @@
             defaultType: void Function(Never)
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -14889,10 +17257,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -14900,6 +17271,7 @@
             defaultType: dynamic Function()
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -14910,10 +17282,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -14921,6 +17296,7 @@
             defaultType: void Function()
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -14936,10 +17312,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -14947,9 +17326,11 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     typeAliases
       functionTypeAliasBased notSimplyBounded F @32
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: dynamic Function(dynamic)
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -14957,6 +17338,7 @@
               type: dynamic
           returnType: dynamic
       functionTypeAliasBased notSimplyBounded G @52
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::G
         aliasedType: dynamic Function(dynamic)
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -14972,10 +17354,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -14983,6 +17368,7 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -14995,13 +17381,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -15013,10 +17403,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -15024,14 +17417,17 @@
             defaultType: D<dynamic>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       class D @30
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @32
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
 ''');
   }
@@ -15044,16 +17440,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -15063,16 +17463,21 @@
         await buildLibrary('class C { C operator+(C other) => null; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           + @20
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::+
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional other @24
@@ -15089,16 +17494,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           == @25
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::==
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional other @35
@@ -15112,16 +17522,21 @@
         await buildLibrary('class C { external C operator+(C other); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           external + @29
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::+
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional other @33
@@ -15138,16 +17553,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           >= @25
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::>=
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional other @30
@@ -15161,16 +17581,21 @@
         await buildLibrary('class C { bool operator[](int i) => null; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           [] @23
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::[]
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional i @30
@@ -15187,16 +17612,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           []= @25
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::[]=
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional i @33
@@ -15215,16 +17645,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           <= @25
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::<=
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional other @30
@@ -15240,23 +17675,30 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     topLevelVariables
       static c @13
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
@@ -15272,23 +17714,30 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     topLevelVariables
       static c @14
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C?
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C?
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
@@ -15301,13 +17750,17 @@
     var library = await buildLibrary('sealed class C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract sealed class C @13
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -15318,19 +17771,25 @@
 sealed class B extends A {}''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       base class A @11
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       abstract sealed base class B @29
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
 ''');
@@ -15342,20 +17801,26 @@
 sealed class B implements A {}''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       base class A @11
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       abstract sealed base class B @29
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
 ''');
   }
@@ -15366,20 +17831,26 @@
 sealed class B implements A {}''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       final class A @12
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       abstract sealed base class B @30
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
 ''');
   }
@@ -15390,19 +17861,25 @@
 sealed class B extends A {}''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       final class A @12
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       abstract sealed final class B @30
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
 ''');
@@ -15415,25 +17892,32 @@
 sealed class C extends B with A {}''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       interface class B @32
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
       abstract sealed final class C @50
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: B
         mixins
           A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
     mixins
       base mixin A @11
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -15446,19 +17930,25 @@
 sealed class B extends A {}''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       interface class A @16
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       abstract sealed interface class B @34
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
 ''');
@@ -15470,20 +17960,26 @@
 sealed class B implements A {}''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       interface class A @16
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       abstract sealed class B @34
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
 ''');
   }
@@ -15493,20 +17989,26 @@
         await buildLibrary('abstract class C { void set x(int value); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class C @15
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           abstract set x= @28
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional value @34
@@ -15520,20 +18022,26 @@
         await buildLibrary('class C { void set x(covariant int value); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           abstract set x= @19
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional covariant value @35
@@ -15547,20 +18055,26 @@
         await buildLibrary('class C { external void set x(int value); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           external set x= @28
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional value @34
@@ -15573,20 +18087,26 @@
     var library = await buildLibrary('class C { void set x(value) {} }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           set x= @19
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional value @21
@@ -15599,20 +18119,26 @@
     var library = await buildLibrary('class C { set x(int value) {} }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           set x= @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional value @20
@@ -15637,71 +18163,89 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           t @16
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::t
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get t @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::t
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic set t= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::t
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _t @-1
                 type: int
             returnType: void
       class B @27
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         fields
           t @50
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::t
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: double
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         accessors
           synthetic get t @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::t
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: double
           synthetic set t= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::t
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _t @-1
                 type: double
             returnType: void
       class C @61
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         interfaces
           B
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
       class D @96
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: C
         fields
           synthetic t @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@field::t
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             superConstructor: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
         accessors
           set t= @121
+            reference: <thisLibrary>::<definingUnit>::@class::D::@setter::t
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             parameters
               requiredPositional p @123
@@ -15716,38 +18260,48 @@
             ' abstract class D { void set f(int value); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: D
         fields
           synthetic f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
         accessors
           set f= @29
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional value @31
                 type: int
             returnType: void
       abstract class D @58
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
         accessors
           abstract set f= @71
+            reference: <thisLibrary>::<definingUnit>::@class::D::@setter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             parameters
               requiredPositional value @77
@@ -15764,20 +18318,26 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic static f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           static set f= @23
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional value @29
@@ -15790,23 +18350,30 @@
     var library = await buildLibrary('class C { void set x({a}) {} }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           set x= @19
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               optionalNamed default a @22
+                reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x::@parameter::a
                 type: dynamic
             returnType: void
 ''');
@@ -15816,20 +18383,26 @@
     var library = await buildLibrary('class C { void set x() {} }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           set x= @19
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: void
 ''');
@@ -15839,20 +18412,26 @@
     var library = await buildLibrary('class C { void set x([a]) {} }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           set x= @19
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               optionalPositional default a @22
@@ -15865,20 +18444,26 @@
     var library = await buildLibrary('class C { void set x(a, b) {} }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           set x= @19
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional a @21
@@ -15899,20 +18484,26 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           set foo= @16
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _ @24
@@ -15931,20 +18522,26 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           set foo= @16 invokesSuperSelf
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _ @24
@@ -15961,20 +18558,26 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           external set x= @21
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional value @27
@@ -15988,20 +18591,26 @@
         await buildLibrary('class C { static void set x(int value) {} }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic static x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           static set x= @26
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional value @32
@@ -16019,29 +18628,37 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
           synthetic y @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           set x= @21
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional value @27
                 type: int
             returnType: void
           set y= @43
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional value @45
@@ -16058,12 +18675,16 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
       class B @17
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
 ''');
@@ -16075,13 +18696,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
 ''');
   }
@@ -16094,23 +18719,29 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class B @34
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
         typeErasure: int
         fields
           final it @21
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
 ''');
@@ -16123,19 +18754,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: D<int, double>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
               substitution: {T1: int, T2: double}
       class D @40
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T1 @42
@@ -16144,6 +18780,7 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
 ''');
   }
@@ -16156,15 +18793,19 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
       class B @20
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A<dynamic>
 ''');
@@ -16177,22 +18818,28 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @20
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A<B>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
@@ -16206,16 +18853,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
 ''');
   }
@@ -16224,13 +18875,17 @@
     var library = await buildLibrary('class C extends D {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -16239,10 +18894,13 @@
     var library = await buildLibrary('class C<T, U> {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -16251,6 +18909,7 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -16262,10 +18921,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -16276,11 +18938,14 @@
             defaultType: D
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       class D @48
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
 ''');
   }
@@ -16289,10 +18954,13 @@
     var library = await buildLibrary('class C<T extends T> {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -16300,6 +18968,7 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -16310,10 +18979,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -16326,6 +18998,7 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -16336,10 +19009,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -16347,6 +19023,7 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
 ''');
   }
@@ -16357,10 +19034,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -16368,6 +19048,7 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -16380,10 +19061,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class A @40
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant X @42
@@ -16397,9 +19081,11 @@
                   Never
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     typeAliases
       F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           contravariant X @10
             defaultType: dynamic
@@ -16420,10 +19106,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class A @36
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant X @38
@@ -16437,9 +19126,11 @@
                   dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     typeAliases
       F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           covariant X @10
             defaultType: dynamic
@@ -16457,10 +19148,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class A @37
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant X @39
@@ -16474,9 +19168,11 @@
                   dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     typeAliases
       F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           invariant X @10
             defaultType: dynamic
@@ -16497,10 +19193,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class A @37
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant X @39
@@ -16514,9 +19213,11 @@
                   dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     typeAliases
       F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           invariant X @10
             defaultType: dynamic
@@ -16535,10 +19236,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant X @8
@@ -16546,6 +19250,7 @@
             defaultType: dynamic Function(Never)
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
 ''');
   }
@@ -16556,10 +19261,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant X @8
@@ -16567,6 +19275,7 @@
             defaultType: void Function(Never)
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
 ''');
   }
@@ -16577,10 +19286,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant X @8
@@ -16588,6 +19300,7 @@
             defaultType: dynamic Function()
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
 ''');
   }
@@ -16598,10 +19311,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant X @8
@@ -16609,6 +19325,7 @@
             defaultType: dynamic Function()
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
 ''');
   }
@@ -16621,10 +19338,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class B @46
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant X @48
@@ -16638,9 +19358,11 @@
                   Never
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         typeParameters
           contravariant X @10
             defaultType: dynamic
@@ -16656,10 +19378,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class B @35
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant X @37
@@ -16673,9 +19398,11 @@
                   dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         typeParameters
           covariant X @10
             defaultType: dynamic
@@ -16687,10 +19414,13 @@
     var library = await buildLibrary('class C<T extends List<U>, U> {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -16700,6 +19430,7 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -16708,10 +19439,13 @@
     var library = await buildLibrary('class C<T extends U, U> {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -16721,6 +19455,7 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -16729,16 +19464,20 @@
     var library = await buildLibrary('class C<in T> {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           contravariant T @11
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -16747,16 +19486,20 @@
     var library = await buildLibrary('class C<out T> {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @12
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -16765,16 +19508,20 @@
     var library = await buildLibrary('class C<inout T> {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           invariant T @14
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -16783,10 +19530,13 @@
     var library = await buildLibrary('class C<inout T, in U, out V> {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           invariant T @14
@@ -16797,6 +19547,7 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -16811,10 +19562,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class alias C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: D
         mixins
@@ -16823,6 +19577,7 @@
           G
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -16833,24 +19588,32 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             superConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
       class D @32
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
       class E @43
+        reference: <thisLibrary>::<definingUnit>::@class::E
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
       class F @54
+        reference: <thisLibrary>::<definingUnit>::@class::F
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::F::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::F
       class G @65
+        reference: <thisLibrary>::<definingUnit>::@class::G
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::G::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::G
 ''');
   }
@@ -16863,16 +19626,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class alias C @15
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: D
         mixins
           E
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -16883,14 +19650,18 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             superConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
       class D @35
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
       class E @46
+        reference: <thisLibrary>::<definingUnit>::@class::E
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
 ''');
   }
@@ -16902,16 +19673,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       base class alias C @11
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Object
         mixins
           M
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -16922,6 +19697,7 @@
                 staticElement: dart:core::<definingUnit>::@class::Object::@constructor::new
     mixins
       mixin M @36
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -16936,26 +19712,34 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       mixin class M @23
+        reference: <thisLibrary>::<definingUnit>::@class::M
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::M::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::M
       class alias X @34
+        reference: <thisLibrary>::<definingUnit>::@class::X
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         mixins
           M
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             constantInitializers
               SuperConstructorInvocation
@@ -16981,34 +19765,44 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional i @18
                 type: int
       mixin class M1 @36
+        reference: <thisLibrary>::<definingUnit>::@class::M1
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::M1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::M1
       mixin class M2 @54
+        reference: <thisLibrary>::<definingUnit>::@class::M2
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::M2::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::M2
       class alias C2 @67
+        reference: <thisLibrary>::<definingUnit>::@class::C2
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: C1
         mixins
           M2
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C2::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C2
             parameters
               requiredPositional i @-1
@@ -17027,12 +19821,14 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::C1::@constructor::new
             superConstructor: <thisLibrary>::<definingUnit>::@class::C1::@constructor::new
       class alias C1 @90
+        reference: <thisLibrary>::<definingUnit>::@class::C1
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         mixins
           M1
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C1
             parameters
               requiredPositional i @-1
@@ -17065,7 +19861,7 @@
 
 class C = A with M;
 ''');
-    configuration.withReferences = true;
+
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -17253,10 +20049,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -17264,6 +20063,7 @@
             defaultType: num
         constructors
           @27
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional x @31
@@ -17271,6 +20071,7 @@
               requiredPositional y @36
                 type: T
       class alias B @61
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant E @63
@@ -17281,6 +20082,7 @@
           M
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional x @-1
@@ -17308,6 +20110,7 @@
               substitution: {T: E}
     mixins
       mixin M @49
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -17326,10 +20129,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class alias C @22
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /**\n * Docs\n */
         supertype: D
@@ -17337,6 +20143,7 @@
           E
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -17347,14 +20154,18 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             superConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
       class D @43
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
       class E @54
+        reference: <thisLibrary>::<definingUnit>::@class::E
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
 ''');
   }
@@ -17371,10 +20182,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class alias C @27
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// aaa\n/// b\n/// cc
         supertype: D
@@ -17382,6 +20196,7 @@
           E
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -17392,14 +20207,18 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             superConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
       class D @48
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
       class E @59
+        reference: <thisLibrary>::<definingUnit>::@class::E
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
 ''');
   }
@@ -17416,10 +20235,13 @@
 class E {}''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class alias C @66
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /**\n * Docs\n */
         supertype: D
@@ -17427,6 +20249,7 @@
           E
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -17437,14 +20260,18 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             superConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
       class D @87
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
       class E @98
+        reference: <thisLibrary>::<definingUnit>::@class::E
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
 ''');
   }
@@ -17456,16 +20283,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       final class alias C @12
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Object
         mixins
           M
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -17476,6 +20307,7 @@
                 staticElement: dart:core::<definingUnit>::@class::Object::@constructor::new
     mixins
       mixin M @37
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -17491,10 +20323,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class alias Z @6
+        reference: <thisLibrary>::<definingUnit>::@class::Z
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         mixins
@@ -17502,6 +20337,7 @@
           C<double>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::Z::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::Z
             constantInitializers
               SuperConstructorInvocation
@@ -17512,25 +20348,31 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
       class A @42
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @53
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant B1 @55
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
       class C @68
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant C1 @70
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -17542,16 +20384,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       interface class alias C @16
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Object
         mixins
           M
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -17562,6 +20408,7 @@
                 staticElement: dart:core::<definingUnit>::@class::Object::@constructor::new
     mixins
       mixin M @41
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -17580,22 +20427,26 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class alias A @23
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Object
         mixins
           M
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             constantInitializers
               SuperConstructorInvocation
@@ -17615,16 +20466,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class alias A @30
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Object
         mixins
           M2
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             constantInitializers
               SuperConstructorInvocation
@@ -17635,10 +20490,12 @@
                 staticElement: dart:core::<definingUnit>::@class::Object::@constructor::new
     mixins
       mixin M1 @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M1
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
       mixin M2 @18
+        reference: <thisLibrary>::<definingUnit>::@mixin::M2
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -17652,16 +20509,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       mixin class alias C @12
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Object
         mixins
           M
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -17672,6 +20533,7 @@
                 staticElement: dart:core::<definingUnit>::@class::Object::@constructor::new
     mixins
       mixin M @37
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -17686,10 +20548,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class alias C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -17700,6 +20565,7 @@
           E
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -17710,14 +20576,18 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             superConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
       class D @39
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
       class E @50
+        reference: <thisLibrary>::<definingUnit>::@class::E
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
 ''');
   }
@@ -17732,10 +20602,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class alias C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -17745,6 +20618,7 @@
           E
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -17755,14 +20629,18 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             superConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
       class D @29
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
       class E @40
+        reference: <thisLibrary>::<definingUnit>::@class::E
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
 ''');
   }
@@ -17777,16 +20655,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class alias C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: D
         mixins
           E
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -17797,14 +20679,18 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             superConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
       class D @26
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
       class E @37
+        reference: <thisLibrary>::<definingUnit>::@class::E
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
 ''');
   }
@@ -17816,16 +20702,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract sealed class alias C @13
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Object
         mixins
           M
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -17836,6 +20726,7 @@
                 staticElement: dart:core::<definingUnit>::@class::Object::@constructor::new
     mixins
       mixin M @38
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -17857,27 +20748,33 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class M @23
+        reference: <thisLibrary>::<definingUnit>::@class::M
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::M::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::M
       class alias MixinApp @34
+        reference: <thisLibrary>::<definingUnit>::@class::MixinApp
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Base
         mixins
           M
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@class::MixinApp::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::MixinApp
             constantInitializers
               SuperConstructorInvocation
@@ -17888,6 +20785,7 @@
                 staticElement: package:test/a.dart::<definingUnit>::@class::Base::@constructor::new
             superConstructor: package:test/a.dart::<definingUnit>::@class::Base::@constructor::new
           synthetic const named @-1
+            reference: <thisLibrary>::<definingUnit>::@class::MixinApp::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::MixinApp
             constantInitializers
               SuperConstructorInvocation
@@ -17928,27 +20826,33 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class M @23
+        reference: <thisLibrary>::<definingUnit>::@class::M
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::M::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::M
       class alias MixinApp @34
+        reference: <thisLibrary>::<definingUnit>::@class::MixinApp
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Base
         mixins
           M
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::MixinApp::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::MixinApp
             constantInitializers
               SuperConstructorInvocation
@@ -17959,6 +20863,7 @@
                 staticElement: package:test/a.dart::<definingUnit>::@class::Base::@constructor::new
             superConstructor: package:test/a.dart::<definingUnit>::@class::Base::@constructor::new
           synthetic noArgs @-1
+            reference: <thisLibrary>::<definingUnit>::@class::MixinApp::@constructor::noArgs
             enclosingElement: <thisLibrary>::<definingUnit>::@class::MixinApp
             constantInitializers
               SuperConstructorInvocation
@@ -17974,6 +20879,7 @@
                 staticElement: package:test/a.dart::<definingUnit>::@class::Base::@constructor::noArgs
             superConstructor: package:test/a.dart::<definingUnit>::@class::Base::@constructor::noArgs
           synthetic requiredArg @-1
+            reference: <thisLibrary>::<definingUnit>::@class::MixinApp::@constructor::requiredArg
             enclosingElement: <thisLibrary>::<definingUnit>::@class::MixinApp
             parameters
               requiredPositional x @-1
@@ -17997,6 +20903,7 @@
                 staticElement: package:test/a.dart::<definingUnit>::@class::Base::@constructor::requiredArg
             superConstructor: package:test/a.dart::<definingUnit>::@class::Base::@constructor::requiredArg
           synthetic positionalArg @-1
+            reference: <thisLibrary>::<definingUnit>::@class::MixinApp::@constructor::positionalArg
             enclosingElement: <thisLibrary>::<definingUnit>::@class::MixinApp
             parameters
               optionalPositional default x @-1
@@ -18024,6 +20931,7 @@
                 staticElement: package:test/a.dart::<definingUnit>::@class::Base::@constructor::positionalArg
             superConstructor: package:test/a.dart::<definingUnit>::@class::Base::@constructor::positionalArg
           synthetic positionalArg2 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::MixinApp::@constructor::positionalArg2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::MixinApp
             parameters
               optionalPositional default final x @-1
@@ -18051,9 +20959,11 @@
                 staticElement: package:test/a.dart::<definingUnit>::@class::Base::@constructor::positionalArg2
             superConstructor: package:test/a.dart::<definingUnit>::@class::Base::@constructor::positionalArg2
           synthetic namedArg @-1
+            reference: <thisLibrary>::<definingUnit>::@class::MixinApp::@constructor::namedArg
             enclosingElement: <thisLibrary>::<definingUnit>::@class::MixinApp
             parameters
               optionalNamed default x @-1
+                reference: <thisLibrary>::<definingUnit>::@class::MixinApp::@constructor::namedArg::@parameter::x
                 type: int
                 constantInitializer
                   IntegerLiteral
@@ -18078,9 +20988,11 @@
                 staticElement: package:test/a.dart::<definingUnit>::@class::Base::@constructor::namedArg
             superConstructor: package:test/a.dart::<definingUnit>::@class::Base::@constructor::namedArg
           synthetic namedArg2 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::MixinApp::@constructor::namedArg2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::MixinApp
             parameters
               optionalNamed default final x @-1
+                reference: <thisLibrary>::<definingUnit>::@class::MixinApp::@constructor::namedArg2::@parameter::x
                 type: bool
                 constantInitializer
                   BooleanLiteral
@@ -18117,16 +21029,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class Base @6
+        reference: <thisLibrary>::<definingUnit>::@class::Base
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @11
             defaultType: dynamic
         constructors
           ctor @23
+            reference: <thisLibrary>::<definingUnit>::@class::Base::@constructor::ctor
             enclosingElement: <thisLibrary>::<definingUnit>::@class::Base
             periodOffset: 22
             nameEnd: 27
@@ -18136,17 +21052,21 @@
               requiredPositional l @41
                 type: List<T>
       class M @53
+        reference: <thisLibrary>::<definingUnit>::@class::M
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::M::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::M
       class alias MixinApp @64
+        reference: <thisLibrary>::<definingUnit>::@class::MixinApp
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Base<dynamic>
         mixins
           M
         constructors
           synthetic ctor @-1
+            reference: <thisLibrary>::<definingUnit>::@class::MixinApp::@constructor::ctor
             enclosingElement: <thisLibrary>::<definingUnit>::@class::MixinApp
             parameters
               requiredPositional t @-1
@@ -18190,16 +21110,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class Base @6
+        reference: <thisLibrary>::<definingUnit>::@class::Base
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @11
             defaultType: dynamic
         constructors
           ctor @23
+            reference: <thisLibrary>::<definingUnit>::@class::Base::@constructor::ctor
             enclosingElement: <thisLibrary>::<definingUnit>::@class::Base
             periodOffset: 22
             nameEnd: 27
@@ -18209,11 +21133,14 @@
               requiredPositional l @41
                 type: List<T>
       class M @53
+        reference: <thisLibrary>::<definingUnit>::@class::M
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::M::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::M
       class alias MixinApp @64
+        reference: <thisLibrary>::<definingUnit>::@class::MixinApp
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant U @73
@@ -18223,6 +21150,7 @@
           M
         constructors
           synthetic ctor @-1
+            reference: <thisLibrary>::<definingUnit>::@class::MixinApp::@constructor::ctor
             enclosingElement: <thisLibrary>::<definingUnit>::@class::MixinApp
             parameters
               requiredPositional t @-1
@@ -18268,16 +21196,20 @@
 }''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class alias C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: D
         mixins
           E
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -18288,39 +21220,50 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             superConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
       class D @26
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
       class E @37
+        reference: <thisLibrary>::<definingUnit>::@class::E
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @105
+            reference: <thisLibrary>::<definingUnit>::@class::E::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
             type: int
           synthetic a @-1
+            reference: <thisLibrary>::<definingUnit>::@class::E::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
             type: int
           synthetic b @-1
+            reference: <thisLibrary>::<definingUnit>::@class::E::@field::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::E::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
             returnType: int
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::E::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
             parameters
               requiredPositional _x @-1
                 type: int
             returnType: void
           get a @51
+            reference: <thisLibrary>::<definingUnit>::@class::E::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
             returnType: int
           set b= @73
+            reference: <thisLibrary>::<definingUnit>::@class::E::@setter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
             parameters
               requiredPositional i @79
@@ -18328,6 +21271,7 @@
             returnType: void
         methods
           f @92
+            reference: <thisLibrary>::<definingUnit>::@class::E::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
             returnType: void
 ''');
@@ -18337,18 +21281,24 @@
     var library = await buildLibrary('class C {} class D {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       class D @17
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
 ''');
   }
@@ -18362,10 +21312,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @0
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -18377,15 +21330,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static final f @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: V Function<U, V>(U, V)
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get f @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: V Function<U, V>(U, V)
 ''');
@@ -18402,18 +21359,23 @@
 library
   name: lib
   nameOffset: 8
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   parts
     package:test/a.dart
+      reference: <thisLibrary>::@unit::package:test/a.dart
       enclosingElement: <thisLibrary>
       topLevelVariables
         static final f @19
+          reference: <thisLibrary>::@unit::package:test/a.dart::@topLevelVariable::f
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           type: double Function(int)
           shouldUseTypeForInitializerInference: false
       accessors
         synthetic static get f @-1
+          reference: <thisLibrary>::@unit::package:test/a.dart::@getter::f
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           returnType: double Function(int)
 ''');
@@ -18448,25 +21410,32 @@
     configuration.withCodeRanges = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class Raw @6
+        reference: <thisLibrary>::<definingUnit>::@class::Raw
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 0
         codeLength: 12
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::Raw::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::Raw
       class HasDocComment @50
+        reference: <thisLibrary>::<definingUnit>::@class::HasDocComment
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 1.\n/// Comment 2.
         codeOffset: 14
         codeLength: 52
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::HasDocComment::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::HasDocComment
       class HasAnnotation @84
+        reference: <thisLibrary>::<definingUnit>::@class::HasAnnotation
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -18483,8 +21452,10 @@
         codeLength: 32
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::HasAnnotation::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::HasAnnotation
       class AnnotationThenComment @148
+        reference: <thisLibrary>::<definingUnit>::@class::AnnotationThenComment
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 1.\n/// Comment 2.
         metadata
@@ -18502,8 +21473,10 @@
         codeLength: 70
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::AnnotationThenComment::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::AnnotationThenComment
       class CommentThenAnnotation @220
+        reference: <thisLibrary>::<definingUnit>::@class::CommentThenAnnotation
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 1.\n/// Comment 2.
         metadata
@@ -18521,8 +21494,10 @@
         codeLength: 70
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::CommentThenAnnotation::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::CommentThenAnnotation
       class CommentAroundAnnotation @292
+        reference: <thisLibrary>::<definingUnit>::@class::CommentAroundAnnotation
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 2.
         metadata
@@ -18540,6 +21515,7 @@
         codeLength: 57
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::CommentAroundAnnotation::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::CommentAroundAnnotation
 ''');
   }
@@ -18577,24 +21553,31 @@
     configuration.withCodeRanges = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 0
         codeLength: 10
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @18
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 12
         codeLength: 10
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
       class alias Raw @30
+        reference: <thisLibrary>::<definingUnit>::@class::Raw
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 24
         codeLength: 29
@@ -18604,6 +21587,7 @@
           B
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@class::Raw::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::Raw
             constantInitializers
               SuperConstructorInvocation
@@ -18613,6 +21597,7 @@
                   rightParenthesis: ) @0
                 staticElement: dart:core::<definingUnit>::@class::Object::@constructor::new
       class alias HasDocComment @91
+        reference: <thisLibrary>::<definingUnit>::@class::HasDocComment
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 1.\n/// Comment 2.
         codeOffset: 55
@@ -18623,6 +21608,7 @@
           B
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@class::HasDocComment::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::HasDocComment
             constantInitializers
               SuperConstructorInvocation
@@ -18632,6 +21618,7 @@
                   rightParenthesis: ) @0
                 staticElement: dart:core::<definingUnit>::@class::Object::@constructor::new
       class alias HasAnnotation @142
+        reference: <thisLibrary>::<definingUnit>::@class::HasAnnotation
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -18652,6 +21639,7 @@
           B
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@class::HasAnnotation::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::HasAnnotation
             constantInitializers
               SuperConstructorInvocation
@@ -18661,6 +21649,7 @@
                   rightParenthesis: ) @0
                 staticElement: dart:core::<definingUnit>::@class::Object::@constructor::new
       class alias AnnotationThenComment @223
+        reference: <thisLibrary>::<definingUnit>::@class::AnnotationThenComment
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 1.\n/// Comment 2.
         metadata
@@ -18682,6 +21671,7 @@
           B
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@class::AnnotationThenComment::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::AnnotationThenComment
             constantInitializers
               SuperConstructorInvocation
@@ -18691,6 +21681,7 @@
                   rightParenthesis: ) @0
                 staticElement: dart:core::<definingUnit>::@class::Object::@constructor::new
       class alias CommentThenAnnotation @312
+        reference: <thisLibrary>::<definingUnit>::@class::CommentThenAnnotation
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 1.\n/// Comment 2.
         metadata
@@ -18712,6 +21703,7 @@
           B
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@class::CommentThenAnnotation::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::CommentThenAnnotation
             constantInitializers
               SuperConstructorInvocation
@@ -18721,6 +21713,7 @@
                   rightParenthesis: ) @0
                 staticElement: dart:core::<definingUnit>::@class::Object::@constructor::new
       class alias CommentAroundAnnotation @401
+        reference: <thisLibrary>::<definingUnit>::@class::CommentAroundAnnotation
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 2.
         metadata
@@ -18742,6 +21735,7 @@
           B
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@class::CommentAroundAnnotation::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::CommentAroundAnnotation
             constantInitializers
               SuperConstructorInvocation
@@ -18786,25 +21780,31 @@
     configuration.withCodeRanges = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 0
         codeLength: 362
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             codeOffset: 12
             codeLength: 4
           raw @22
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::raw
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             codeOffset: 20
             codeLength: 10
             periodOffset: 21
             nameEnd: 25
           hasDocComment @70
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::hasDocComment
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /// Comment 1.\n/// Comment 2.
             codeOffset: 34
@@ -18812,6 +21812,7 @@
             periodOffset: 69
             nameEnd: 83
           hasAnnotation @106
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::hasAnnotation
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             metadata
               Annotation
@@ -18829,6 +21830,7 @@
             periodOffset: 105
             nameEnd: 119
           annotationThenComment @176
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::annotationThenComment
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /// Comment 1.\n/// Comment 2.
             metadata
@@ -18847,6 +21849,7 @@
             periodOffset: 175
             nameEnd: 197
           commentThenAnnotation @254
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::commentThenAnnotation
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /// Comment 1.\n/// Comment 2.
             metadata
@@ -18865,6 +21868,7 @@
             periodOffset: 253
             nameEnd: 275
           commentAroundAnnotation @332
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::commentAroundAnnotation
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /// Comment 2.
             metadata
@@ -18918,25 +21922,31 @@
     configuration.withCodeRanges = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 0
         codeLength: 483
         constructors
           factory @20
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             codeOffset: 12
             codeLength: 23
           factory raw @49
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::raw
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             codeOffset: 39
             codeLength: 27
             periodOffset: 48
             nameEnd: 52
           factory hasDocComment @114
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::hasDocComment
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /// Comment 1.\n/// Comment 2.
             codeOffset: 70
@@ -18944,6 +21954,7 @@
             periodOffset: 113
             nameEnd: 127
           factory hasAnnotation @167
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::hasAnnotation
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             metadata
               Annotation
@@ -18961,6 +21972,7 @@
             periodOffset: 166
             nameEnd: 180
           factory annotationThenComment @254
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::annotationThenComment
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /// Comment 1.\n/// Comment 2.
             metadata
@@ -18979,6 +21991,7 @@
             periodOffset: 253
             nameEnd: 275
           factory commentThenAnnotation @349
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::commentThenAnnotation
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /// Comment 1.\n/// Comment 2.
             metadata
@@ -18997,6 +22010,7 @@
             periodOffset: 348
             nameEnd: 370
           factory commentAroundAnnotation @444
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::commentAroundAnnotation
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /// Comment 2.
             metadata
@@ -19026,16 +22040,20 @@
     configuration.withCodeRanges = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 0
         codeLength: 26
         supertype: Enum
         fields
           static const enumConstant aaa @11
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::aaa
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             codeOffset: 11
             codeLength: 3
@@ -19054,6 +22072,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           static const enumConstant bbb @16
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::bbb
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             codeOffset: 16
             codeLength: 3
@@ -19072,6 +22091,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           static const enumConstant ccc @21
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::ccc
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             codeOffset: 21
             codeLength: 3
@@ -19090,6 +22110,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -19112,18 +22133,23 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get aaa @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::aaa
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get bbb @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::bbb
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get ccc @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::ccc
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
 ''');
@@ -19160,29 +22186,36 @@
     configuration.withCodeRanges = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 0
         codeLength: 10
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     extensions
       Raw @22
+        reference: <thisLibrary>::<definingUnit>::@extension::Raw
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 12
         codeLength: 21
         extendedType: A
       HasDocComment @75
+        reference: <thisLibrary>::<definingUnit>::@extension::HasDocComment
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 1.\n/// Comment 2.
         codeOffset: 35
         codeLength: 61
         extendedType: A
       HasAnnotation @118
+        reference: <thisLibrary>::<definingUnit>::@extension::HasAnnotation
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -19199,6 +22232,7 @@
         codeLength: 41
         extendedType: A
       AnnotationThenComment @191
+        reference: <thisLibrary>::<definingUnit>::@extension::AnnotationThenComment
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 1.\n/// Comment 2.
         metadata
@@ -19216,6 +22250,7 @@
         codeLength: 79
         extendedType: A
       CommentThenAnnotation @272
+        reference: <thisLibrary>::<definingUnit>::@extension::CommentThenAnnotation
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 1.\n/// Comment 2.
         metadata
@@ -19233,6 +22268,7 @@
         codeLength: 79
         extendedType: A
       CommentAroundAnnotation @353
+        reference: <thisLibrary>::<definingUnit>::@extension::CommentAroundAnnotation
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 2.
         metadata
@@ -19265,37 +22301,45 @@
     configuration.withCodeRanges = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 0
         codeLength: 115
         fields
           withInit @16
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::withInit
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             codeOffset: 12
             codeLength: 16
             type: int
             shouldUseTypeForInitializerInference: true
           withoutInit @37
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::withoutInit
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             codeOffset: 33
             codeLength: 15
             type: int
           multiWithInit @57
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::multiWithInit
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             codeOffset: 53
             codeLength: 21
             type: int
             shouldUseTypeForInitializerInference: true
           multiWithoutInit @76
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::multiWithoutInit
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             codeOffset: 76
             codeLength: 16
             type: int
           multiWithInit2 @94
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::multiWithInit2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             codeOffset: 94
             codeLength: 18
@@ -19303,48 +22347,59 @@
             shouldUseTypeForInitializerInference: true
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get withInit @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::withInit
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set withInit= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::withInit
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _withInit @-1
                 type: int
             returnType: void
           synthetic get withoutInit @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::withoutInit
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set withoutInit= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::withoutInit
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _withoutInit @-1
                 type: int
             returnType: void
           synthetic get multiWithInit @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::multiWithInit
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set multiWithInit= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::multiWithInit
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _multiWithInit @-1
                 type: int
             returnType: void
           synthetic get multiWithoutInit @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::multiWithoutInit
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set multiWithoutInit= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::multiWithoutInit
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _multiWithoutInit @-1
                 type: int
             returnType: void
           synthetic get multiWithInit2 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::multiWithInit2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set multiWithInit2= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::multiWithInit2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _multiWithInit2 @-1
@@ -19382,27 +22437,33 @@
     configuration.withCodeRanges = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 0
         codeLength: 436
         fields
           hasDocComment @50
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::hasDocComment
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /// Comment 1.\n/// Comment 2.
             codeOffset: 12
             codeLength: 51
             type: int
           hasDocComment2 @65
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::hasDocComment2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /// Comment 1.\n/// Comment 2.
             codeOffset: 65
             codeLength: 14
             type: int
           hasAnnotation @100
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::hasAnnotation
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             metadata
               Annotation
@@ -19419,6 +22480,7 @@
             codeLength: 29
             type: int
           hasAnnotation2 @115
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::hasAnnotation2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             metadata
               Annotation
@@ -19435,6 +22497,7 @@
             codeLength: 14
             type: int
           annotationThenComment @184
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::annotationThenComment
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /// Comment 1.\n/// Comment 2.
             metadata
@@ -19452,6 +22515,7 @@
             codeLength: 71
             type: int
           annotationThenComment2 @207
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::annotationThenComment2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /// Comment 1.\n/// Comment 2.
             metadata
@@ -19469,6 +22533,7 @@
             codeLength: 22
             type: int
           commentThenAnnotation @284
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::commentThenAnnotation
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /// Comment 1.\n/// Comment 2.
             metadata
@@ -19486,6 +22551,7 @@
             codeLength: 71
             type: int
           commentThenAnnotation2 @307
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::commentThenAnnotation2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /// Comment 1.\n/// Comment 2.
             metadata
@@ -19503,6 +22569,7 @@
             codeLength: 22
             type: int
           commentAroundAnnotation @384
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::commentAroundAnnotation
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /// Comment 2.
             metadata
@@ -19520,6 +22587,7 @@
             codeLength: 56
             type: int
           commentAroundAnnotation2 @409
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::commentAroundAnnotation2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /// Comment 2.
             metadata
@@ -19538,93 +22606,114 @@
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get hasDocComment @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::hasDocComment
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set hasDocComment= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::hasDocComment
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _hasDocComment @-1
                 type: int
             returnType: void
           synthetic get hasDocComment2 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::hasDocComment2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set hasDocComment2= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::hasDocComment2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _hasDocComment2 @-1
                 type: int
             returnType: void
           synthetic get hasAnnotation @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::hasAnnotation
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set hasAnnotation= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::hasAnnotation
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _hasAnnotation @-1
                 type: int
             returnType: void
           synthetic get hasAnnotation2 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::hasAnnotation2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set hasAnnotation2= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::hasAnnotation2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _hasAnnotation2 @-1
                 type: int
             returnType: void
           synthetic get annotationThenComment @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::annotationThenComment
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set annotationThenComment= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::annotationThenComment
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _annotationThenComment @-1
                 type: int
             returnType: void
           synthetic get annotationThenComment2 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::annotationThenComment2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set annotationThenComment2= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::annotationThenComment2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _annotationThenComment2 @-1
                 type: int
             returnType: void
           synthetic get commentThenAnnotation @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::commentThenAnnotation
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set commentThenAnnotation= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::commentThenAnnotation
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _commentThenAnnotation @-1
                 type: int
             returnType: void
           synthetic get commentThenAnnotation2 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::commentThenAnnotation2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set commentThenAnnotation2= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::commentThenAnnotation2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _commentThenAnnotation2 @-1
                 type: int
             returnType: void
           synthetic get commentAroundAnnotation @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::commentAroundAnnotation
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set commentAroundAnnotation= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::commentAroundAnnotation
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _commentAroundAnnotation @-1
                 type: int
             returnType: void
           synthetic get commentAroundAnnotation2 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::commentAroundAnnotation2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set commentAroundAnnotation2= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::commentAroundAnnotation2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _commentAroundAnnotation2 @-1
@@ -19662,21 +22751,26 @@
     configuration.withCodeRanges = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       raw @5
+        reference: <thisLibrary>::<definingUnit>::@function::raw
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 0
         codeLength: 13
         returnType: void
       hasDocComment @50
+        reference: <thisLibrary>::<definingUnit>::@function::hasDocComment
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 1.\n/// Comment 2.
         codeOffset: 15
         codeLength: 53
         returnType: void
       hasAnnotation @85
+        reference: <thisLibrary>::<definingUnit>::@function::hasAnnotation
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -19693,6 +22787,7 @@
         codeLength: 33
         returnType: void
       annotationThenComment @150
+        reference: <thisLibrary>::<definingUnit>::@function::annotationThenComment
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 1.\n/// Comment 2.
         metadata
@@ -19710,6 +22805,7 @@
         codeLength: 71
         returnType: void
       commentThenAnnotation @223
+        reference: <thisLibrary>::<definingUnit>::@function::commentThenAnnotation
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 1.\n/// Comment 2.
         metadata
@@ -19727,6 +22823,7 @@
         codeLength: 71
         returnType: void
       commentAroundAnnotation @296
+        reference: <thisLibrary>::<definingUnit>::@function::commentAroundAnnotation
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 2.
         metadata
@@ -19775,16 +22872,20 @@
     configuration.withCodeRanges = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased Raw @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::Raw
         codeOffset: 0
         codeLength: 14
         aliasedType: dynamic Function()
         aliasedElement: GenericFunctionTypeElement
           returnType: dynamic
       functionTypeAliasBased HasDocComment @54
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::HasDocComment
         documentationComment: /// Comment 1.\n/// Comment 2.
         codeOffset: 16
         codeLength: 54
@@ -19792,6 +22893,7 @@
         aliasedElement: GenericFunctionTypeElement
           returnType: dynamic
       functionTypeAliasBased HasAnnotation @90
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::HasAnnotation
         metadata
           Annotation
             atSign: @ @72
@@ -19809,6 +22911,7 @@
         aliasedElement: GenericFunctionTypeElement
           returnType: dynamic
       functionTypeAliasBased AnnotationThenComment @156
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::AnnotationThenComment
         documentationComment: /// Comment 1.\n/// Comment 2.
         metadata
           Annotation
@@ -19827,6 +22930,7 @@
         aliasedElement: GenericFunctionTypeElement
           returnType: dynamic
       functionTypeAliasBased CommentThenAnnotation @230
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::CommentThenAnnotation
         documentationComment: /// Comment 1.\n/// Comment 2.
         metadata
           Annotation
@@ -19845,6 +22949,7 @@
         aliasedElement: GenericFunctionTypeElement
           returnType: dynamic
       functionTypeAliasBased CommentAroundAnnotation @304
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::CommentAroundAnnotation
         documentationComment: /// Comment 2.
         metadata
           Annotation
@@ -19894,16 +22999,20 @@
     configuration.withCodeRanges = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       Raw @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::Raw
         codeOffset: 0
         codeLength: 25
         aliasedType: dynamic Function()
         aliasedElement: GenericFunctionTypeElement
           returnType: dynamic
       HasDocComment @65
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::HasDocComment
         documentationComment: /// Comment 1.\n/// Comment 2.
         codeOffset: 27
         codeLength: 65
@@ -19911,6 +23020,7 @@
         aliasedElement: GenericFunctionTypeElement
           returnType: dynamic
       HasAnnotation @112
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::HasAnnotation
         metadata
           Annotation
             atSign: @ @94
@@ -19928,6 +23038,7 @@
         aliasedElement: GenericFunctionTypeElement
           returnType: dynamic
       AnnotationThenComment @189
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::AnnotationThenComment
         documentationComment: /// Comment 1.\n/// Comment 2.
         metadata
           Annotation
@@ -19946,6 +23057,7 @@
         aliasedElement: GenericFunctionTypeElement
           returnType: dynamic
       CommentThenAnnotation @274
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::CommentThenAnnotation
         documentationComment: /// Comment 1.\n/// Comment 2.
         metadata
           Annotation
@@ -19964,6 +23076,7 @@
         aliasedElement: GenericFunctionTypeElement
           returnType: dynamic
       CommentAroundAnnotation @359
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::CommentAroundAnnotation
         documentationComment: /// Comment 2.
         metadata
           Annotation
@@ -20015,29 +23128,36 @@
     configuration.withCodeRanges = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 0
         codeLength: 372
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           raw @17
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::raw
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             codeOffset: 12
             codeLength: 13
             returnType: void
           hasDocComment @68
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::hasDocComment
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /// Comment 1.\n/// Comment 2.
             codeOffset: 29
             codeLength: 57
             returnType: void
           hasAnnotation @107
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::hasAnnotation
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             metadata
               Annotation
@@ -20054,6 +23174,7 @@
             codeLength: 35
             returnType: void
           annotationThenComment @180
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::annotationThenComment
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /// Comment 1.\n/// Comment 2.
             metadata
@@ -20071,6 +23192,7 @@
             codeLength: 77
             returnType: void
           commentThenAnnotation @261
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::commentThenAnnotation
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /// Comment 1.\n/// Comment 2.
             metadata
@@ -20088,6 +23210,7 @@
             codeLength: 77
             returnType: void
           commentAroundAnnotation @342
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::commentAroundAnnotation
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             documentationComment: /// Comment 2.
             metadata
@@ -20114,15 +23237,19 @@
     configuration.withCodeRanges = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       main @0
+        reference: <thisLibrary>::<definingUnit>::@function::main
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 0
         codeLength: 38
         parameters
           optionalNamed default a @10
+            reference: <thisLibrary>::<definingUnit>::@function::main::@parameter::a
             type: int
             codeOffset: 6
             codeLength: 9
@@ -20131,10 +23258,12 @@
                 literal: 1 @14
                 staticType: int
           optionalNamed default b @21
+            reference: <thisLibrary>::<definingUnit>::@function::main::@parameter::b
             type: int
             codeOffset: 17
             codeLength: 5
           optionalNamed default c @28
+            reference: <thisLibrary>::<definingUnit>::@function::main::@parameter::c
             type: int
             codeOffset: 24
             codeLength: 9
@@ -20153,10 +23282,13 @@
     configuration.withCodeRanges = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       main @0
+        reference: <thisLibrary>::<definingUnit>::@function::main
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 0
         codeLength: 48
@@ -20210,32 +23342,39 @@
     configuration.withCodeRanges = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static withInit @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::withInit
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 0
         codeLength: 24
         type: int
         shouldUseTypeForInitializerInference: true
       static withoutInit @31
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::withoutInit
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 27
         codeLength: 15
         type: int
       static multiWithInit @49
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::multiWithInit
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 45
         codeLength: 21
         type: int
         shouldUseTypeForInitializerInference: true
       static multiWithoutInit @68
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::multiWithoutInit
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 68
         codeLength: 16
         type: int
       static multiWithInit2 @86
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::multiWithInit2
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 86
         codeLength: 18
@@ -20243,45 +23382,55 @@
         shouldUseTypeForInitializerInference: true
     accessors
       synthetic static get withInit @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::withInit
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set withInit= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::withInit
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _withInit @-1
             type: int
         returnType: void
       synthetic static get withoutInit @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::withoutInit
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set withoutInit= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::withoutInit
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _withoutInit @-1
             type: int
         returnType: void
       synthetic static get multiWithInit @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::multiWithInit
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set multiWithInit= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::multiWithInit
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _multiWithInit @-1
             type: int
         returnType: void
       synthetic static get multiWithoutInit @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::multiWithoutInit
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set multiWithoutInit= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::multiWithoutInit
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _multiWithoutInit @-1
             type: int
         returnType: void
       synthetic static get multiWithInit2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::multiWithInit2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set multiWithInit2= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::multiWithInit2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _multiWithInit2 @-1
@@ -20317,22 +23466,27 @@
     configuration.withCodeRanges = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static hasDocComment @34
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::hasDocComment
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 1.\n/// Comment 2.
         codeOffset: 0
         codeLength: 47
         type: int
       static hasDocComment2 @49
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::hasDocComment2
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 1.\n/// Comment 2.
         codeOffset: 49
         codeLength: 14
         type: int
       static hasAnnotation @80
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::hasAnnotation
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -20349,6 +23503,7 @@
         codeLength: 27
         type: int
       static hasAnnotation2 @95
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::hasAnnotation2
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -20365,6 +23520,7 @@
         codeLength: 14
         type: int
       static annotationThenComment @156
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::annotationThenComment
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 1.\n/// Comment 2.
         metadata
@@ -20382,6 +23538,7 @@
         codeLength: 65
         type: int
       static annotationThenComment2 @179
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::annotationThenComment2
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 1.\n/// Comment 2.
         metadata
@@ -20399,6 +23556,7 @@
         codeLength: 22
         type: int
       static commentThenAnnotation @248
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::commentThenAnnotation
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 1.\n/// Comment 2.
         metadata
@@ -20416,6 +23574,7 @@
         codeLength: 65
         type: int
       static commentThenAnnotation2 @271
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::commentThenAnnotation2
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 1.\n/// Comment 2.
         metadata
@@ -20433,6 +23592,7 @@
         codeLength: 22
         type: int
       static commentAroundAnnotation @340
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::commentAroundAnnotation
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 2.
         metadata
@@ -20450,6 +23610,7 @@
         codeLength: 52
         type: int
       static commentAroundAnnotation2 @365
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::commentAroundAnnotation2
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Comment 2.
         metadata
@@ -20468,90 +23629,110 @@
         type: int
     accessors
       synthetic static get hasDocComment @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::hasDocComment
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set hasDocComment= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::hasDocComment
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _hasDocComment @-1
             type: int
         returnType: void
       synthetic static get hasDocComment2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::hasDocComment2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set hasDocComment2= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::hasDocComment2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _hasDocComment2 @-1
             type: int
         returnType: void
       synthetic static get hasAnnotation @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::hasAnnotation
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set hasAnnotation= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::hasAnnotation
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _hasAnnotation @-1
             type: int
         returnType: void
       synthetic static get hasAnnotation2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::hasAnnotation2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set hasAnnotation2= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::hasAnnotation2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _hasAnnotation2 @-1
             type: int
         returnType: void
       synthetic static get annotationThenComment @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::annotationThenComment
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set annotationThenComment= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::annotationThenComment
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _annotationThenComment @-1
             type: int
         returnType: void
       synthetic static get annotationThenComment2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::annotationThenComment2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set annotationThenComment2= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::annotationThenComment2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _annotationThenComment2 @-1
             type: int
         returnType: void
       synthetic static get commentThenAnnotation @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::commentThenAnnotation
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set commentThenAnnotation= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::commentThenAnnotation
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _commentThenAnnotation @-1
             type: int
         returnType: void
       synthetic static get commentThenAnnotation2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::commentThenAnnotation2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set commentThenAnnotation2= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::commentThenAnnotation2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _commentThenAnnotation2 @-1
             type: int
         returnType: void
       synthetic static get commentAroundAnnotation @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::commentAroundAnnotation
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set commentAroundAnnotation= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::commentAroundAnnotation
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _commentAroundAnnotation @-1
             type: int
         returnType: void
       synthetic static get commentAroundAnnotation2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::commentAroundAnnotation2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set commentAroundAnnotation2= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::commentAroundAnnotation2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _commentAroundAnnotation2 @-1
@@ -20568,10 +23749,13 @@
     configuration.withCodeRanges = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 0
         codeLength: 13
@@ -20582,9 +23766,11 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     functions
       f @19
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 14
         codeLength: 24
@@ -20605,10 +23791,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @10
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: num
         shouldUseTypeForInitializerInference: true
@@ -20617,6 +23806,7 @@
             literal: 0 @14
             staticType: int
       static const b @23
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -20634,9 +23824,11 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: num
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -20649,10 +23841,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -20661,6 +23856,7 @@
             literal: 0 @10
             staticType: int
       static const b @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -20686,9 +23882,11 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -20700,10 +23898,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -20734,6 +23935,7 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -20748,13 +23950,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static const f1 @29
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::f1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: true
@@ -20763,6 +23969,7 @@
                 literal: 1 @34
                 staticType: int
           static const f2 @56
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::f2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: true
@@ -20780,6 +23987,7 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::C::@getter::f1
                 staticType: int
           static const f3 @67
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::f3
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: true
@@ -20798,15 +24006,19 @@
                 staticType: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic static get f1 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::f1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic static get f2 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::f2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic static get f3 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::f3
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -20824,26 +24036,32 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         fields
           final t @23
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::t
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: T
         constructors
           const @34
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional final this.t @41
                 type: T
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::t
           const named @55
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 54
             nameEnd: 60
@@ -20853,10 +24071,12 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::t
         accessors
           synthetic get t @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::t
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: T
     topLevelVariables
       static const x @85
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Object
         shouldUseTypeForInitializerInference: true
@@ -20880,6 +24100,7 @@
               rightParenthesis: ) @98
             staticType: C<int>
       static const y @114
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::y
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Object
         shouldUseTypeForInitializerInference: true
@@ -20911,9 +24132,11 @@
             staticType: C<int>
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Object
       synthetic static get y @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::y
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Object
 ''');
@@ -20939,18 +24162,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           named @14
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 13
             nameEnd: 19
     topLevelVariables
       static const v @31
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: A Function()
         shouldUseTypeForInitializerInference: false
@@ -20970,6 +24198,7 @@
             staticType: A Function()
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A Function()
 ''');
@@ -20984,13 +24213,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final f @22
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: true
@@ -21000,9 +24233,11 @@
                 staticType: int
         constructors
           const @38
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -21016,10 +24251,13 @@
 ''');
     checkElementText(library, '''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const v @44
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: void Function(int)
         shouldUseTypeForInitializerInference: true
@@ -21034,10 +24272,12 @@
               int
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: void Function(int)
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @7
@@ -21056,10 +24296,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const v @24
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: void Function(int)
         shouldUseTypeForInitializerInference: false
@@ -21082,10 +24325,12 @@
               int
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: void Function(int)
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @7
@@ -21105,10 +24350,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<int>
         shouldUseTypeForInitializerInference: false
@@ -21122,6 +24370,7 @@
             rightBracket: ] @12
             staticType: List<int>
       static const b @21
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -21130,6 +24379,7 @@
             literal: 0 @25
             staticType: int
       static const c @34
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -21151,12 +24401,15 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<int>
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -21183,18 +24436,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class P @6
+        reference: <thisLibrary>::<definingUnit>::@class::P
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const @21
+            reference: <thisLibrary>::<definingUnit>::@class::P::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::P
       class P1 @35
+        reference: <thisLibrary>::<definingUnit>::@class::P1
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @38
@@ -21202,11 +24460,13 @@
         supertype: P<T>
         constructors
           const @64
+            reference: <thisLibrary>::<definingUnit>::@class::P1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::P1
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::P::@constructor::new
               substitution: {T: T}
       class P2 @79
+        reference: <thisLibrary>::<definingUnit>::@class::P2
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @82
@@ -21214,12 +24474,14 @@
         supertype: P<T>
         constructors
           const @108
+            reference: <thisLibrary>::<definingUnit>::@class::P2::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::P2
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::P::@constructor::new
               substitution: {T: T}
     topLevelVariables
       static const values @131
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::values
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<P<dynamic>>
         shouldUseTypeForInitializerInference: true
@@ -21265,6 +24527,7 @@
             staticType: List<P<dynamic>>
     accessors
       synthetic static get values @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::values
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<P<dynamic>>
 ''');
@@ -21279,13 +24542,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static const f @25
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: false
@@ -21310,13 +24577,16 @@
                 staticType: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic static get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
     functions
       foo @46
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -21331,25 +24601,32 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final f @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
     functions
       foo @39
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -21361,10 +24638,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const v @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int Function()
         shouldUseTypeForInitializerInference: false
@@ -21375,6 +24655,7 @@
             staticType: null
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function()
 ''');
@@ -21388,13 +24669,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @19
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             constantInitializers
               AssertInitializer
@@ -21416,13 +24701,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @19
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             constantInitializers
               AssertInitializer
@@ -21450,17 +24739,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final foo @26
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: Object?
         constructors
           const @39
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             constantInitializers
               ConstructorFieldInitializer
@@ -21475,6 +24769,7 @@
                   staticType: null
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: Object?
 ''');
@@ -21486,10 +24781,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const v @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: InvalidType
         shouldUseTypeForInitializerInference: false
@@ -21500,6 +24798,7 @@
             staticType: null
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: InvalidType
 ''');
@@ -21514,13 +24813,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @18
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @27
@@ -21528,6 +24831,7 @@
               requiredPositional b @37
                 type: Object
           const named @51
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 50
             nameEnd: 56
@@ -21561,13 +24865,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @18
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @27
@@ -21575,10 +24883,12 @@
               requiredPositional b @37
                 type: Object
       class B @49
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           const @71
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             constantInitializers
               SuperConstructorInvocation
@@ -21615,10 +24925,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -21642,6 +24955,7 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -21653,10 +24967,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const v @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: (int,)
         shouldUseTypeForInitializerInference: false
@@ -21667,6 +24984,7 @@
             staticType: null
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: (int,)
 ''');
@@ -21679,10 +24997,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const v @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -21707,10 +25028,12 @@
             staticType: int
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
     functions
       foo @25
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -21722,10 +25045,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -21736,6 +25062,7 @@
             staticType: null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -21748,10 +25075,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @10
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
@@ -21760,6 +25090,7 @@
             literal: 0 @14
             staticType: int
       static const b @28
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: true
@@ -21778,9 +25109,11 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
 ''');
@@ -21795,10 +25128,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant K @8
@@ -21807,6 +25143,7 @@
             defaultType: dynamic
         constructors
           const named @26
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 25
             nameEnd: 31
@@ -21817,6 +25154,7 @@
                 type: V
     topLevelVariables
       static const V @51
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C<int, String>
         shouldUseTypeForInitializerInference: false
@@ -21862,6 +25200,7 @@
             staticType: C<int, String>
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C<int, String>
 ''');
@@ -21879,16 +25218,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const V @23
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C<int, String>
         shouldUseTypeForInitializerInference: false
@@ -21934,6 +25276,7 @@
             staticType: C<int, String>
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C<int, String>
 ''');
@@ -21951,19 +25294,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart as p @19
       enclosingElement: <thisLibrary>
   prefixes
     p @19
+      reference: <thisLibrary>::@prefix::p
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart as p @19
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const V @28
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C<int, String>
         shouldUseTypeForInitializerInference: false
@@ -22013,6 +25360,7 @@
             staticType: C<int, String>
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C<int, String>
 ''');
@@ -22027,10 +25375,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant K @8
@@ -22039,9 +25390,11 @@
             defaultType: dynamic
         constructors
           const @24
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     topLevelVariables
       static const V @37
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C<dynamic, dynamic>
         shouldUseTypeForInitializerInference: false
@@ -22062,6 +25415,7 @@
             staticType: C<dynamic, dynamic>
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C<dynamic, dynamic>
 ''');
@@ -22077,20 +25431,25 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         fields
           final t @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::t
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: T
         constructors
           const @34
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional final this.t @41
@@ -22098,10 +25457,12 @@
                 field: <thisLibrary>::<definingUnit>::@class::A::@field::t
         accessors
           synthetic get t @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::t
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: T
     topLevelVariables
       static const a @60
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Object
         shouldUseTypeForInitializerInference: true
@@ -22126,6 +25487,7 @@
             staticType: A<int>
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Object
 ''');
@@ -22140,10 +25502,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant K @8
@@ -22152,9 +25517,11 @@
             defaultType: dynamic
         constructors
           const @24
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     topLevelVariables
       static const V @37
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C<int, String>
         shouldUseTypeForInitializerInference: false
@@ -22187,6 +25554,7 @@
             staticType: C<int, String>
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C<int, String>
 ''');
@@ -22204,16 +25572,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const V @23
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C<int, String>
         shouldUseTypeForInitializerInference: false
@@ -22246,6 +25617,7 @@
             staticType: C<int, String>
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C<int, String>
 ''');
@@ -22263,19 +25635,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart as p @19
       enclosingElement: <thisLibrary>
   prefixes
     p @19
+      reference: <thisLibrary>::@prefix::p
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart as p @19
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const V @28
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C<int, String>
         shouldUseTypeForInitializerInference: false
@@ -22312,6 +25688,7 @@
             staticType: C<int, String>
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C<int, String>
 ''');
@@ -22326,13 +25703,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const named @20
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 19
             nameEnd: 25
@@ -22344,11 +25725,14 @@
               requiredPositional c @45
                 type: int
               optionalNamed default d @56
+                reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named::@parameter::d
                 type: String
               optionalNamed default e @66
+                reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named::@parameter::e
                 type: double
     topLevelVariables
       static const V @79
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
         shouldUseTypeForInitializerInference: false
@@ -22401,6 +25785,7 @@
             staticType: C
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
 ''');
@@ -22418,16 +25803,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const V @23
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
         shouldUseTypeForInitializerInference: false
@@ -22451,6 +25839,7 @@
             staticType: C
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
 ''');
@@ -22468,19 +25857,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart as p @19
       enclosingElement: <thisLibrary>
   prefixes
     p @19
+      reference: <thisLibrary>::@prefix::p
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart as p @19
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const V @28
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
         shouldUseTypeForInitializerInference: false
@@ -22508,6 +25901,7 @@
             staticType: C
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
 ''');
@@ -22520,16 +25914,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     topLevelVariables
       static const V @17
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
         shouldUseTypeForInitializerInference: false
@@ -22553,6 +25952,7 @@
             staticType: C
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
 ''');
@@ -22564,10 +25964,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const V @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: InvalidType
         shouldUseTypeForInitializerInference: false
@@ -22590,6 +25993,7 @@
             staticType: InvalidType
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: InvalidType
 ''');
@@ -22606,19 +26010,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart as p @19
       enclosingElement: <thisLibrary>
   prefixes
     p @19
+      reference: <thisLibrary>::@prefix::p
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart as p @19
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const V @28
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
         shouldUseTypeForInitializerInference: false
@@ -22646,6 +26054,7 @@
             staticType: C
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
 ''');
@@ -22659,19 +26068,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart as p @19
       enclosingElement: <thisLibrary>
   prefixes
     p @19
+      reference: <thisLibrary>::@prefix::p
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart as p @19
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const V @28
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: InvalidType
         shouldUseTypeForInitializerInference: false
@@ -22699,6 +26112,7 @@
             staticType: InvalidType
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: InvalidType
 ''');
@@ -22710,10 +26124,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const V @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: InvalidType
         shouldUseTypeForInitializerInference: false
@@ -22741,6 +26158,7 @@
             staticType: InvalidType
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: InvalidType
 ''');
@@ -22753,19 +26171,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     topLevelVariables
       static const V @20
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C<dynamic>
         shouldUseTypeForInitializerInference: false
@@ -22789,6 +26212,7 @@
             staticType: C<dynamic>
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C<dynamic>
 ''');
@@ -22803,16 +26227,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     topLevelVariables
       static const V @31
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
         shouldUseTypeForInitializerInference: false
@@ -22831,6 +26260,7 @@
             staticType: C
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
 ''');
@@ -22848,16 +26278,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const V @23
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
         shouldUseTypeForInitializerInference: false
@@ -22876,6 +26309,7 @@
             staticType: C
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
 ''');
@@ -22893,19 +26327,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart as p @19
       enclosingElement: <thisLibrary>
   prefixes
     p @19
+      reference: <thisLibrary>::@prefix::p
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart as p @19
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const V @28
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
         shouldUseTypeForInitializerInference: false
@@ -22928,6 +26366,7 @@
             staticType: C
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
 ''');
@@ -22939,10 +26378,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const V @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: InvalidType
         shouldUseTypeForInitializerInference: false
@@ -22961,6 +26403,7 @@
             staticType: InvalidType
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: InvalidType
 ''');
@@ -22974,19 +26417,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart as p @19
       enclosingElement: <thisLibrary>
   prefixes
     p @19
+      reference: <thisLibrary>::@prefix::p
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart as p @19
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const V @28
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: InvalidType
         shouldUseTypeForInitializerInference: false
@@ -23009,6 +26456,7 @@
             staticType: InvalidType
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: InvalidType
 ''');
@@ -23020,10 +26468,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const V @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: InvalidType
         shouldUseTypeForInitializerInference: false
@@ -23046,6 +26497,7 @@
             staticType: InvalidType
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: InvalidType
 ''');
@@ -23058,10 +26510,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -23070,6 +26525,7 @@
             literal: 0 @10
             staticType: int
       static const b @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
@@ -23087,9 +26543,11 @@
             staticType: bool
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
 ''');
@@ -23104,13 +26562,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static const F @32
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::F
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: String
             shouldUseTypeForInitializerInference: true
@@ -23119,13 +26581,16 @@
                 literal: '' @36
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic static get F @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::F
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: String
     topLevelVariables
       static const v @52
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
@@ -23151,6 +26616,7 @@
             staticType: int
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -23168,16 +26634,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const v @27
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
@@ -23203,6 +26672,7 @@
             staticType: int
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -23220,19 +26690,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart as p @19
       enclosingElement: <thisLibrary>
   prefixes
     p @19
+      reference: <thisLibrary>::@prefix::p
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart as p @19
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const v @32
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
@@ -23265,6 +26739,7 @@
             staticType: int
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -23276,10 +26751,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const v @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -23295,6 +26773,7 @@
             staticType: int
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -23307,10 +26786,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const S @13
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::S
         enclosingElement: <thisLibrary>::<definingUnit>
         type: String
         shouldUseTypeForInitializerInference: true
@@ -23318,6 +26800,7 @@
           SimpleStringLiteral
             literal: 'abc' @17
       static const v @30
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -23336,9 +26819,11 @@
             staticType: int
     accessors
       synthetic static get S @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::S
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: String
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -23354,16 +26839,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const v @23
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -23382,6 +26870,7 @@
             staticType: int
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -23397,19 +26886,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart as p @19
       enclosingElement: <thisLibrary>
   prefixes
     p @19
+      reference: <thisLibrary>::@prefix::p
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart as p @19
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const v @28
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -23435,6 +26928,7 @@
             staticType: int
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -23449,20 +26943,26 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           static length @23
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::length
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
     topLevelVariables
       static const v @47
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int Function()
         shouldUseTypeForInitializerInference: false
@@ -23481,6 +26981,7 @@
             staticType: int Function()
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function()
 ''');
@@ -23492,10 +26993,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const x @13
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Object
         shouldUseTypeForInitializerInference: true
@@ -23526,6 +27030,7 @@
             staticType: List<int>
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Object
 ''');
@@ -23537,10 +27042,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const x @13
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Object
         shouldUseTypeForInitializerInference: true
@@ -23575,6 +27083,7 @@
             staticType: List<int>
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Object
 ''');
@@ -23589,10 +27098,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const x @13
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Object
         shouldUseTypeForInitializerInference: true
@@ -23608,6 +27120,7 @@
             staticType: List<int>
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Object
 ''');
@@ -23619,10 +27132,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const x @13
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Object
         shouldUseTypeForInitializerInference: true
@@ -23661,6 +27177,7 @@
             staticType: List<int>
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Object
 ''');
@@ -23672,10 +27189,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const x @13
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Object
         shouldUseTypeForInitializerInference: true
@@ -23714,6 +27234,7 @@
             staticType: List<int>
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Object
 ''');
@@ -23725,10 +27246,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const x @13
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Object
         shouldUseTypeForInitializerInference: true
@@ -23769,6 +27293,7 @@
             staticType: Map<int, int>
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Object
 ''');
@@ -23783,10 +27308,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const x @13
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Object
         shouldUseTypeForInitializerInference: true
@@ -23808,6 +27336,7 @@
             staticType: Map<int, double>
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Object
 ''');
@@ -23819,10 +27348,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const x @13
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Object
         shouldUseTypeForInitializerInference: true
@@ -23876,6 +27408,7 @@
             staticType: Map<int, int>
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Object
 ''');
@@ -23887,10 +27420,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const x @13
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Object
         shouldUseTypeForInitializerInference: true
@@ -23944,6 +27480,7 @@
             staticType: Map<int, int>
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Object
 ''');
@@ -23956,10 +27493,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const b @24
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -23990,10 +27530,12 @@
               int
     accessors
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
     functions
       f @2
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @4
@@ -24015,20 +27557,26 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final x @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           const @29
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               optionalNamed default final this.x @37
+                reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new::@parameter::x
                 type: dynamic
                 constantInitializer
                   SimpleIdentifier
@@ -24038,10 +27586,12 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
     functions
       foo @53
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -24056,20 +27606,26 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final x @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           const @29
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               optionalNamed default final this.x @37
+                reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new::@parameter::x
                 type: dynamic
                 constantInitializer
                   BinaryExpression
@@ -24086,6 +27642,7 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
 ''');
@@ -24100,17 +27657,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final x @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           const @29
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               optionalPositional default final this.x @37
@@ -24130,6 +27692,7 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
 ''');
@@ -24148,13 +27711,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const positional @20
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::positional
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 19
             nameEnd: 30
@@ -24174,11 +27741,13 @@
                     staticInvokeType: num Function(num)
                     staticType: int
           const named @55
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 54
             nameEnd: 60
             parameters
               optionalNamed default p @62
+                reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named::@parameter::p
                 type: dynamic
                 constantInitializer
                   BinaryExpression
@@ -24194,6 +27763,7 @@
                     staticType: int
         methods
           methodPositional @81
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::methodPositional
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               optionalPositional default p @99
@@ -24212,15 +27782,18 @@
                     staticType: int
             returnType: void
           methodPositionalWithoutDefault @121
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::methodPositionalWithoutDefault
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               optionalPositional default p @153
                 type: dynamic
             returnType: void
           methodNamed @167
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::methodNamed
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               optionalNamed default p @180
+                reference: <thisLibrary>::<definingUnit>::@class::C::@method::methodNamed::@parameter::p
                 type: dynamic
                 constantInitializer
                   BinaryExpression
@@ -24236,9 +27809,11 @@
                     staticType: int
             returnType: void
           methodNamedWithoutDefault @201
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::methodNamedWithoutDefault
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               optionalNamed default p @228
+                reference: <thisLibrary>::<definingUnit>::@class::C::@method::methodNamedWithoutDefault::@parameter::p
                 type: dynamic
             returnType: void
 ''');
@@ -24251,10 +27826,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -24263,6 +27841,7 @@
             literal: 0 @10
             staticType: int
       static const b @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -24281,9 +27860,11 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -24296,10 +27877,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @11
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int?
         shouldUseTypeForInitializerInference: true
@@ -24308,6 +27892,7 @@
             literal: 0 @15
             staticType: int
       static const b @24
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -24322,9 +27907,11 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int?
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -24337,10 +27924,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -24349,6 +27939,7 @@
             literal: 0 @10
             staticType: int
       static const b @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -24363,9 +27954,11 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -24384,16 +27977,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const b @23
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -24408,6 +28004,7 @@
             staticType: int
     accessors
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -24420,10 +28017,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -24432,6 +28032,7 @@
             literal: 0 @10
             staticType: int
       static const b @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -24450,9 +28051,11 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -24465,10 +28068,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -24477,6 +28083,7 @@
             literal: 0 @10
             staticType: int
       static const b @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: (int, {int a})
         shouldUseTypeForInitializerInference: false
@@ -24503,9 +28110,11 @@
             staticType: (int, {int a})
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: (int, {int a})
 ''');
@@ -24518,10 +28127,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -24530,6 +28142,7 @@
             literal: 0 @10
             staticType: int
       static const b @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: (int, {int a})
         shouldUseTypeForInitializerInference: false
@@ -24557,9 +28170,11 @@
             staticType: (int, {int a})
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: (int, {int a})
 ''');
@@ -24574,13 +28189,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static const F @29
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::F
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: true
@@ -24590,13 +28209,16 @@
                 staticType: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic static get F @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::F
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
     topLevelVariables
       static const V @45
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -24615,6 +28237,7 @@
             staticType: int
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -24632,16 +28255,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const V @23
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -24660,6 +28286,7 @@
             staticType: int
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -24677,19 +28304,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart as p @19
       enclosingElement: <thisLibrary>
   prefixes
     p @19
+      reference: <thisLibrary>::@prefix::p
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart as p @19
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const V @28
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -24715,6 +28346,7 @@
             staticType: int
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -24729,16 +28361,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           static m @23
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional a @29
@@ -24748,6 +28385,7 @@
             returnType: int
     topLevelVariables
       static const V @57
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int Function(int, String)
         shouldUseTypeForInitializerInference: false
@@ -24766,6 +28404,7 @@
             staticType: int Function(int, String)
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function(int, String)
 ''');
@@ -24783,16 +28422,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const V @23
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int Function(int, String)
         shouldUseTypeForInitializerInference: false
@@ -24811,6 +28453,7 @@
             staticType: int Function(int, String)
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function(int, String)
 ''');
@@ -24828,19 +28471,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart as p @19
       enclosingElement: <thisLibrary>
   prefixes
     p @19
+      reference: <thisLibrary>::@prefix::p
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart as p @19
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const V @28
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int Function(int, String)
         shouldUseTypeForInitializerInference: false
@@ -24866,6 +28513,7 @@
             staticType: int Function(int, String)
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function(int, String)
 ''');
@@ -24881,24 +28529,31 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     extensions
       E @21
+        reference: <thisLibrary>::<definingUnit>::@extension::E
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: A
         methods
           static f @44
+            reference: <thisLibrary>::<definingUnit>::@extension::E::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::E
             returnType: void
     topLevelVariables
       static const x @59
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: void Function()
         shouldUseTypeForInitializerInference: false
@@ -24917,6 +28572,7 @@
             staticType: void Function()
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: void Function()
 ''');
@@ -24929,10 +28585,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const V @15
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic Function()
         shouldUseTypeForInitializerInference: false
@@ -24943,10 +28602,12 @@
             staticType: dynamic Function()
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic Function()
     functions
       foo @0
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -24959,10 +28620,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const V @26
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: R Function<P, R>(P)
         shouldUseTypeForInitializerInference: false
@@ -24973,10 +28637,12 @@
             staticType: R Function<P, R>(P)
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: R Function<P, R>(P)
     functions
       foo @2
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant P @6
@@ -25000,16 +28666,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const V @23
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic Function()
         shouldUseTypeForInitializerInference: false
@@ -25020,6 +28689,7 @@
             staticType: dynamic Function()
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic Function()
 ''');
@@ -25035,19 +28705,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart as p @19
       enclosingElement: <thisLibrary>
   prefixes
     p @19
+      reference: <thisLibrary>::@prefix::p
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart as p @19
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const V @28
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic Function()
         shouldUseTypeForInitializerInference: false
@@ -25066,6 +28740,7 @@
             staticType: dynamic Function()
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic Function()
 ''');
@@ -25078,10 +28753,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const A @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::A
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -25090,6 +28768,7 @@
             literal: 1 @10
             staticType: int
       static const B @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::B
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -25108,9 +28787,11 @@
             staticType: int
     accessors
       synthetic static get A @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::A
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get B @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::B
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -25126,16 +28807,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const B @23
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::B
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -25154,6 +28838,7 @@
             staticType: int
     accessors
       synthetic static get B @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::B
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -25169,19 +28854,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart as p @19
       enclosingElement: <thisLibrary>
   prefixes
     p @19
+      reference: <thisLibrary>::@prefix::p
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart as p @19
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const B @28
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::B
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -25208,6 +28897,7 @@
             staticType: int
     accessors
       synthetic static get B @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::B
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -25229,28 +28919,36 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       class D @17
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @19
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
     enums
       enum E @30
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant a @33
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -25267,6 +28965,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           static const enumConstant b @36
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::b
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -25283,6 +28982,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           static const enumConstant c @39
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::c
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -25299,6 +28999,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -25321,22 +29022,28 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get a @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get b @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get c @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::c
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
     typeAliases
       functionTypeAliasBased F @50
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: dynamic Function(int, String)
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -25347,6 +29054,7 @@
           returnType: dynamic
     topLevelVariables
       static const vDynamic @76
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDynamic
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Type
         shouldUseTypeForInitializerInference: false
@@ -25356,6 +29064,7 @@
             staticElement: dynamic@-1
             staticType: Type
       static const vNull @102
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vNull
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Type
         shouldUseTypeForInitializerInference: false
@@ -25365,6 +29074,7 @@
             staticElement: dart:core::<definingUnit>::@class::Null
             staticType: Type
       static const vObject @122
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vObject
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Type
         shouldUseTypeForInitializerInference: false
@@ -25374,6 +29084,7 @@
             staticElement: dart:core::<definingUnit>::@class::Object
             staticType: Type
       static const vClass @146
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vClass
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Type
         shouldUseTypeForInitializerInference: false
@@ -25383,6 +29094,7 @@
             staticElement: <thisLibrary>::<definingUnit>::@class::C
             staticType: Type
       static const vGenericClass @164
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vGenericClass
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Type
         shouldUseTypeForInitializerInference: false
@@ -25392,6 +29104,7 @@
             staticElement: <thisLibrary>::<definingUnit>::@class::D
             staticType: Type
       static const vEnum @189
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vEnum
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Type
         shouldUseTypeForInitializerInference: false
@@ -25401,6 +29114,7 @@
             staticElement: <thisLibrary>::<definingUnit>::@enum::E
             staticType: Type
       static const vFunctionTypeAlias @206
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vFunctionTypeAlias
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Type
         shouldUseTypeForInitializerInference: false
@@ -25411,24 +29125,31 @@
             staticType: Type
     accessors
       synthetic static get vDynamic @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDynamic
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Type
       synthetic static get vNull @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vNull
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Type
       synthetic static get vObject @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vObject
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Type
       synthetic static get vClass @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vClass
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Type
       synthetic static get vGenericClass @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vGenericClass
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Type
       synthetic static get vEnum @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vEnum
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Type
       synthetic static get vFunctionTypeAlias @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vFunctionTypeAlias
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Type
 ''');
@@ -25443,25 +29164,32 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @19
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final f @31
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: List<dynamic Function()>
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: List<dynamic Function()>
     typeAliases
       functionTypeAliasBased F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: dynamic Function()
         aliasedElement: GenericFunctionTypeElement
           returnType: dynamic
@@ -25482,16 +29210,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const vClass @23
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vClass
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Type
         shouldUseTypeForInitializerInference: false
@@ -25501,6 +29232,7 @@
             staticElement: package:test/a.dart::<definingUnit>::@class::C
             staticType: Type
       static const vEnum @41
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vEnum
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Type
         shouldUseTypeForInitializerInference: false
@@ -25510,6 +29242,7 @@
             staticElement: package:test/a.dart::<definingUnit>::@enum::E
             staticType: Type
       static const vFunctionTypeAlias @58
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vFunctionTypeAlias
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Type
         shouldUseTypeForInitializerInference: false
@@ -25520,12 +29253,15 @@
             staticType: Type
     accessors
       synthetic static get vClass @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vClass
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Type
       synthetic static get vEnum @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vEnum
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Type
       synthetic static get vFunctionTypeAlias @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vFunctionTypeAlias
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Type
 ''');
@@ -25545,19 +29281,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart as p @19
       enclosingElement: <thisLibrary>
   prefixes
     p @19
+      reference: <thisLibrary>::@prefix::p
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart as p @19
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const vClass @28
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vClass
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Type
         shouldUseTypeForInitializerInference: false
@@ -25575,6 +29315,7 @@
             staticElement: package:test/a.dart::<definingUnit>::@class::C
             staticType: Type
       static const vEnum @48
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vEnum
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Type
         shouldUseTypeForInitializerInference: false
@@ -25592,6 +29333,7 @@
             staticElement: package:test/a.dart::<definingUnit>::@enum::E
             staticType: Type
       static const vFunctionTypeAlias @67
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vFunctionTypeAlias
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Type
         shouldUseTypeForInitializerInference: false
@@ -25610,12 +29352,15 @@
             staticType: Type
     accessors
       synthetic static get vClass @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vClass
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Type
       synthetic static get vEnum @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vEnum
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Type
       synthetic static get vFunctionTypeAlias @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vFunctionTypeAlias
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Type
 ''');
@@ -25629,24 +29374,30 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         fields
           final f @21
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: List<T>
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: List<T>
 ''');
@@ -25658,10 +29409,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const V @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: InvalidType
         shouldUseTypeForInitializerInference: false
@@ -25672,6 +29426,7 @@
             staticType: InvalidType
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: InvalidType
 ''');
@@ -25684,16 +29439,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     topLevelVariables
       static const V @17
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: InvalidType
         shouldUseTypeForInitializerInference: false
@@ -25712,6 +29472,7 @@
             staticType: InvalidType
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: InvalidType
 ''');
@@ -25727,19 +29488,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo.dart as p @21
       enclosingElement: <thisLibrary>
   prefixes
     p @21
+      reference: <thisLibrary>::@prefix::p
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo.dart as p @21
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const V @30
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: InvalidType
         shouldUseTypeForInitializerInference: false
@@ -25765,6 +29530,7 @@
             staticType: InvalidType
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: InvalidType
 ''');
@@ -25776,10 +29542,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const x @13
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Object
         shouldUseTypeForInitializerInference: true
@@ -25811,6 +29580,7 @@
             staticType: Set<int>
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Object
 ''');
@@ -25825,10 +29595,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const x @13
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Object
         shouldUseTypeForInitializerInference: true
@@ -25845,6 +29618,7 @@
             staticType: Set<int>
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Object
 ''');
@@ -25856,10 +29630,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const x @13
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Object
         shouldUseTypeForInitializerInference: true
@@ -25900,6 +29677,7 @@
             staticType: Set<int>
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Object
 ''');
@@ -25911,10 +29689,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const x @13
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Object
         shouldUseTypeForInitializerInference: true
@@ -25955,6 +29736,7 @@
             staticType: Set<int>
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Object
 ''');
@@ -25983,10 +29765,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const vEqual @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vEqual
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
@@ -26003,6 +29788,7 @@
             staticInvokeType: bool Function(Object)
             staticType: bool
       static const vAnd @29
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vAnd
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
@@ -26019,6 +29805,7 @@
             staticInvokeType: null
             staticType: bool
       static const vOr @57
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vOr
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
@@ -26035,6 +29822,7 @@
             staticInvokeType: null
             staticType: bool
       static const vBitXor @84
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vBitXor
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -26051,6 +29839,7 @@
             staticInvokeType: int Function(int)
             staticType: int
       static const vBitAnd @107
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vBitAnd
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -26067,6 +29856,7 @@
             staticInvokeType: int Function(int)
             staticType: int
       static const vBitOr @130
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vBitOr
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -26083,6 +29873,7 @@
             staticInvokeType: int Function(int)
             staticType: int
       static const vBitShiftLeft @152
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vBitShiftLeft
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -26099,6 +29890,7 @@
             staticInvokeType: int Function(int)
             staticType: int
       static const vBitShiftRight @182
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vBitShiftRight
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -26115,6 +29907,7 @@
             staticInvokeType: int Function(int)
             staticType: int
       static const vAdd @213
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vAdd
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -26131,6 +29924,7 @@
             staticInvokeType: num Function(num)
             staticType: int
       static const vSubtract @233
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vSubtract
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -26147,6 +29941,7 @@
             staticInvokeType: num Function(num)
             staticType: int
       static const vMiltiply @258
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vMiltiply
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -26163,6 +29958,7 @@
             staticInvokeType: num Function(num)
             staticType: int
       static const vDivide @283
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDivide
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
@@ -26179,6 +29975,7 @@
             staticInvokeType: double Function(num)
             staticType: double
       static const vFloorDivide @306
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vFloorDivide
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -26195,6 +29992,7 @@
             staticInvokeType: int Function(num)
             staticType: int
       static const vModulo @335
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vModulo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -26211,6 +30009,7 @@
             staticInvokeType: num Function(num)
             staticType: int
       static const vGreater @358
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vGreater
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
@@ -26227,6 +30026,7 @@
             staticInvokeType: bool Function(num)
             staticType: bool
       static const vGreaterEqual @382
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vGreaterEqual
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
@@ -26243,6 +30043,7 @@
             staticInvokeType: bool Function(num)
             staticType: bool
       static const vLess @412
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vLess
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
@@ -26259,6 +30060,7 @@
             staticInvokeType: bool Function(num)
             staticType: bool
       static const vLessEqual @433
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vLessEqual
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
@@ -26276,57 +30078,75 @@
             staticType: bool
     accessors
       synthetic static get vEqual @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vEqual
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static get vAnd @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vAnd
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static get vOr @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vOr
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static get vBitXor @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vBitXor
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get vBitAnd @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vBitAnd
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get vBitOr @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vBitOr
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get vBitShiftLeft @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vBitShiftLeft
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get vBitShiftRight @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vBitShiftRight
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get vAdd @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vAdd
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get vSubtract @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vSubtract
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get vMiltiply @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vMiltiply
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get vDivide @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDivide
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static get vFloorDivide @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vFloorDivide
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get vModulo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vModulo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get vGreater @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vGreater
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static get vGreaterEqual @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vGreaterEqual
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static get vLess @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vLess
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static get vLessEqual @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vLessEqual
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
 ''');
@@ -26338,10 +30158,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const vConditional @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vConditional
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -26373,6 +30196,7 @@
             staticType: int
     accessors
       synthetic static get vConditional @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vConditional
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -26384,10 +30208,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const vIdentical @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vIdentical
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -26419,6 +30246,7 @@
             staticType: int
     accessors
       synthetic static get vIdentical @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vIdentical
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -26430,10 +30258,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const vIfNull @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vIfNull
         enclosingElement: <thisLibrary>::<definingUnit>
         type: num
         shouldUseTypeForInitializerInference: false
@@ -26451,6 +30282,7 @@
             staticType: num
     accessors
       synthetic static get vIfNull @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vIfNull
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: num
 ''');
@@ -26474,10 +30306,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const vNull @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vNull
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -26486,6 +30321,7 @@
             literal: null @14
             staticType: Null
       static const vBoolFalse @26
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vBoolFalse
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
@@ -26494,6 +30330,7 @@
             literal: false @39
             staticType: bool
       static const vBoolTrue @52
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vBoolTrue
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
@@ -26502,6 +30339,7 @@
             literal: true @64
             staticType: bool
       static const vIntPositive @76
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vIntPositive
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -26510,6 +30348,7 @@
             literal: 1 @91
             staticType: int
       static const vIntNegative @100
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vIntNegative
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -26522,6 +30361,7 @@
             staticElement: dart:core::<definingUnit>::@class::int::@method::unary-
             staticType: int
       static const vIntLong1 @125
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vIntLong1
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -26530,6 +30370,7 @@
             literal: 0x7FFFFFFFFFFFFFFF @137
             staticType: int
       static const vIntLong2 @163
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vIntLong2
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -26538,6 +30379,7 @@
             literal: 0xFFFFFFFFFFFFFFFF @175
             staticType: int
       static const vIntLong3 @201
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vIntLong3
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -26546,6 +30388,7 @@
             literal: 0x8000000000000000 @213
             staticType: int
       static const vDouble @239
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
@@ -26554,6 +30397,7 @@
             literal: 2.3 @249
             staticType: double
       static const vString @260
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vString
         enclosingElement: <thisLibrary>::<definingUnit>
         type: String
         shouldUseTypeForInitializerInference: false
@@ -26561,6 +30405,7 @@
           SimpleStringLiteral
             literal: 'abc' @270
       static const vStringConcat @283
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vStringConcat
         enclosingElement: <thisLibrary>::<definingUnit>
         type: String
         shouldUseTypeForInitializerInference: false
@@ -26574,6 +30419,7 @@
             staticType: String
             stringValue: aaabbb
       static const vStringInterpolation @318
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vStringInterpolation
         enclosingElement: <thisLibrary>::<definingUnit>
         type: String
         shouldUseTypeForInitializerInference: false
@@ -26601,6 +30447,7 @@
             staticType: String
             stringValue: null
       static const vSymbol @372
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vSymbol
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Symbol
         shouldUseTypeForInitializerInference: false
@@ -26616,42 +30463,55 @@
                 offset: 391
     accessors
       synthetic static get vNull @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vNull
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static get vBoolFalse @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vBoolFalse
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static get vBoolTrue @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vBoolTrue
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static get vIntPositive @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vIntPositive
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get vIntNegative @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vIntNegative
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get vIntLong1 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vIntLong1
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get vIntLong2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vIntLong2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get vIntLong3 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vIntLong3
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get vDouble @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static get vString @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vString
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: String
       synthetic static get vStringConcat @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vStringConcat
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: String
       synthetic static get vStringInterpolation @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vStringInterpolation
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: String
       synthetic static get vSymbol @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vSymbol
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Symbol
 ''');
@@ -26664,10 +30524,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @11
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int?
         shouldUseTypeForInitializerInference: true
@@ -26676,6 +30539,7 @@
             literal: 0 @15
             staticType: int
       static const b @24
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: String?
         shouldUseTypeForInitializerInference: false
@@ -26697,9 +30561,11 @@
             staticType: String?
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int?
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: String?
 ''');
@@ -26712,10 +30578,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @11
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int?
         shouldUseTypeForInitializerInference: true
@@ -26724,6 +30593,7 @@
             literal: 0 @15
             staticType: int
       static const b @24
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int?
         shouldUseTypeForInitializerInference: false
@@ -26748,9 +30618,11 @@
             staticType: int?
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int?
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int?
 ''');
@@ -26766,10 +30638,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @14
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: String?
         shouldUseTypeForInitializerInference: true
@@ -26777,6 +30652,7 @@
           SimpleStringLiteral
             literal: '' @18
       static const b @40
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<int?>
         shouldUseTypeForInitializerInference: true
@@ -26799,9 +30675,11 @@
             staticType: List<int?>
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: String?
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<int?>
 ''');
@@ -26815,10 +30693,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const v1 @10
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v1
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
@@ -26847,6 +30728,7 @@
             staticInvokeType: num Function(num)
             staticType: int
       static const v2 @38
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v2
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
@@ -26871,6 +30753,7 @@
             staticElement: dart:core::<definingUnit>::@class::int::@method::unary-
             staticType: int
       static const v3 @63
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v3
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
@@ -26897,12 +30780,15 @@
             staticType: int
     accessors
       synthetic static get v1 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v1
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get v2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get v3 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v3
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -26917,10 +30803,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const vNotEqual @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vNotEqual
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
@@ -26937,6 +30826,7 @@
             staticInvokeType: bool Function(Object)
             staticType: bool
       static const vNot @32
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vNot
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
@@ -26949,6 +30839,7 @@
             staticElement: <null>
             staticType: bool
       static const vNegate @52
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vNegate
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -26961,6 +30852,7 @@
             staticElement: dart:core::<definingUnit>::@class::int::@method::unary-
             staticType: int
       static const vComplement @72
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vComplement
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -26974,15 +30866,19 @@
             staticType: int
     accessors
       synthetic static get vNotEqual @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vNotEqual
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static get vNot @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vNot
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static get vNegate @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vNegate
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get vComplement @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vComplement
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -26994,10 +30890,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const vSuper @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vSuper
         enclosingElement: <thisLibrary>::<definingUnit>
         type: InvalidType
         shouldUseTypeForInitializerInference: false
@@ -27007,6 +30906,7 @@
             staticType: InvalidType
     accessors
       synthetic static get vSuper @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vSuper
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: InvalidType
 ''');
@@ -27018,10 +30918,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const vThis @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vThis
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -27031,6 +30934,7 @@
             staticType: dynamic
     accessors
       synthetic static get vThis @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vThis
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -27042,10 +30946,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const c @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Never
         shouldUseTypeForInitializerInference: false
@@ -27058,6 +30965,7 @@
             staticType: Never
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Never
 ''');
@@ -27074,10 +30982,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const vNull @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vNull
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<Null>
         shouldUseTypeForInitializerInference: false
@@ -27096,6 +31007,7 @@
             rightBracket: ] @27
             staticType: List<Null>
       static const vDynamic @36
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDynamic
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<dynamic>
         shouldUseTypeForInitializerInference: false
@@ -27124,6 +31036,7 @@
             rightBracket: ] @70
             staticType: List<dynamic>
       static const vInterfaceNoTypeParameters @79
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vInterfaceNoTypeParameters
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<int>
         shouldUseTypeForInitializerInference: false
@@ -27152,6 +31065,7 @@
             rightBracket: ] @127
             staticType: List<int>
       static const vInterfaceNoTypeArguments @136
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vInterfaceNoTypeArguments
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<List<dynamic>>
         shouldUseTypeForInitializerInference: false
@@ -27170,6 +31084,7 @@
             rightBracket: ] @177
             staticType: List<List<dynamic>>
       static const vInterfaceWithTypeArguments @186
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vInterfaceWithTypeArguments
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<List<String>>
         shouldUseTypeForInitializerInference: false
@@ -27196,6 +31111,7 @@
             rightBracket: ] @237
             staticType: List<List<String>>
       static const vInterfaceWithTypeArguments2 @246
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vInterfaceWithTypeArguments2
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<Map<int, List<String>>>
         shouldUseTypeForInitializerInference: false
@@ -27235,21 +31151,27 @@
             staticType: List<Map<int, List<String>>>
     accessors
       synthetic static get vNull @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vNull
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<Null>
       synthetic static get vDynamic @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDynamic
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<dynamic>
       synthetic static get vInterfaceNoTypeParameters @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vInterfaceNoTypeParameters
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<int>
       synthetic static get vInterfaceNoTypeArguments @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vInterfaceNoTypeArguments
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<List<dynamic>>
       synthetic static get vInterfaceWithTypeArguments @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vInterfaceWithTypeArguments
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<List<String>>
       synthetic static get vInterfaceWithTypeArguments2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vInterfaceWithTypeArguments2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<Map<int, List<String>>>
 ''');
@@ -27263,16 +31185,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const v @23
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<C>
         shouldUseTypeForInitializerInference: false
@@ -27292,6 +31217,7 @@
             staticType: List<C>
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<C>
 ''');
@@ -27305,19 +31231,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart as p @19
       enclosingElement: <thisLibrary>
   prefixes
     p @19
+      reference: <thisLibrary>::@prefix::p
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart as p @19
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const v @28
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<C>
         shouldUseTypeForInitializerInference: false
@@ -27341,6 +31271,7 @@
             staticType: List<C>
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<C>
 ''');
@@ -27353,10 +31284,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @12
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: int Function(String)
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -27365,6 +31299,7 @@
           returnType: int
     topLevelVariables
       static const v @32
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<int Function(String)>
         shouldUseTypeForInitializerInference: false
@@ -27385,6 +31320,7 @@
             staticType: List<int Function(String)>
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<int Function(String)>
 ''');
@@ -27399,10 +31335,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const vDynamic1 @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDynamic1
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Map<dynamic, int>
         shouldUseTypeForInitializerInference: false
@@ -27426,6 +31365,7 @@
             isMap: true
             staticType: Map<dynamic, int>
       static const vDynamic2 @48
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDynamic2
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Map<int, dynamic>
         shouldUseTypeForInitializerInference: false
@@ -27449,6 +31389,7 @@
             isMap: true
             staticType: Map<int, dynamic>
       static const vInterface @90
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vInterface
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Map<int, String>
         shouldUseTypeForInitializerInference: false
@@ -27472,6 +31413,7 @@
             isMap: true
             staticType: Map<int, String>
       static const vInterfaceWithTypeArguments @132
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vInterfaceWithTypeArguments
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Map<int, List<String>>
         shouldUseTypeForInitializerInference: false
@@ -27504,15 +31446,19 @@
             staticType: Map<int, List<String>>
     accessors
       synthetic static get vDynamic1 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDynamic1
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Map<dynamic, int>
       synthetic static get vDynamic2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDynamic2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Map<int, dynamic>
       synthetic static get vInterface @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vInterface
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Map<int, String>
       synthetic static get vInterfaceWithTypeArguments @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vInterfaceWithTypeArguments
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Map<int, List<String>>
 ''');
@@ -27526,10 +31472,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const vDynamic1 @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDynamic1
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Set<dynamic>
         shouldUseTypeForInitializerInference: false
@@ -27549,6 +31498,7 @@
             isMap: false
             staticType: Set<dynamic>
       static const vInterface @43
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vInterface
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Set<int>
         shouldUseTypeForInitializerInference: false
@@ -27568,6 +31518,7 @@
             isMap: false
             staticType: Set<int>
       static const vInterfaceWithTypeArguments @77
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vInterfaceWithTypeArguments
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Set<List<String>>
         shouldUseTypeForInitializerInference: false
@@ -27596,12 +31547,15 @@
             staticType: Set<List<String>>
     accessors
       synthetic static get vDynamic1 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDynamic1
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Set<dynamic>
       synthetic static get vInterface @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vInterface
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Set<int>
       synthetic static get vInterfaceWithTypeArguments @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vInterfaceWithTypeArguments
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Set<List<String>>
 ''');
@@ -27613,10 +31567,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const v @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<int>
         shouldUseTypeForInitializerInference: false
@@ -27638,6 +31595,7 @@
             staticType: List<int>
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<int>
 ''');
@@ -27649,10 +31607,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const v @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Map<int, String>
         shouldUseTypeForInitializerInference: false
@@ -27687,6 +31648,7 @@
             staticType: Map<int, String>
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Map<int, String>
 ''');
@@ -27698,10 +31660,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const v @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Set<int>
         shouldUseTypeForInitializerInference: false
@@ -27724,6 +31689,7 @@
             staticType: Set<int>
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Set<int>
 ''');
@@ -27735,10 +31701,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const v @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Type
         shouldUseTypeForInitializerInference: false
@@ -27759,6 +31728,7 @@
             staticType: Type
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Type
 ''');
@@ -27773,14 +31743,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant a @8
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -27797,6 +31771,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           static const enumConstant b @11
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::b
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -27813,6 +31788,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           static const enumConstant c @14
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::c
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -27829,6 +31805,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -27851,41 +31828,52 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get a @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get b @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get c @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::c
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
     topLevelVariables
       static final vValue @23
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vValue
         enclosingElement: <thisLibrary>::<definingUnit>
         type: E
         shouldUseTypeForInitializerInference: false
       static final vValues @43
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vValues
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<E>
         shouldUseTypeForInitializerInference: false
       static final vIndex @69
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vIndex
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get vValue @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vValue
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: E
       synthetic static get vValues @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vValues
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<E>
       synthetic static get vIndex @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vIndex
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -27898,14 +31886,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant a @8
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -27922,6 +31914,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -27936,21 +31929,26 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get a @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
     topLevelVariables
       static final vToString @17
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vToString
         enclosingElement: <thisLibrary>::<definingUnit>
         type: String
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get vToString @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vToString
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: String
 ''');
@@ -27965,13 +31963,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static const a @25
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
             shouldUseTypeForInitializerInference: false
@@ -27981,6 +31983,7 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::C::@getter::b
                 staticType: dynamic
           static const b @47
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
             shouldUseTypeForInitializerInference: false
@@ -27990,12 +31993,15 @@
                 staticType: Null
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic static get a @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
           synthetic static get b @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
 ''');
@@ -28010,13 +32016,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static const a @25
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic Function()
             shouldUseTypeForInitializerInference: false
@@ -28027,13 +32037,16 @@
                 staticType: dynamic Function()
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic static get a @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic Function()
         methods
           static m @41
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
 ''');
@@ -28047,22 +32060,28 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           abstract X @21
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::X
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               optionalNamed default a @32
+                reference: <thisLibrary>::<definingUnit>::@class::A::@method::X::@parameter::a
                 type: List<T>
                 constantInitializer
                   ListLiteral
@@ -28087,13 +32106,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class X @57
+        reference: <thisLibrary>::<definingUnit>::@class::X
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final f @71
+            reference: <thisLibrary>::<definingUnit>::@class::X::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             type: void Function(dynamic)
               alias: <thisLibrary>::<definingUnit>::@typeAlias::F
@@ -28101,9 +32124,11 @@
                   dynamic
         constructors
           const @82
+            reference: <thisLibrary>::<definingUnit>::@class::X::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             parameters
               optionalNamed default final this.f @90
+                reference: <thisLibrary>::<definingUnit>::@class::X::@constructor::new::@parameter::f
                 type: void Function(dynamic)
                   alias: <thisLibrary>::<definingUnit>::@typeAlias::F
                     typeArguments
@@ -28120,6 +32145,7 @@
                 field: <thisLibrary>::<definingUnit>::@class::X::@field::f
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             returnType: void Function(dynamic)
               alias: <thisLibrary>::<definingUnit>::@typeAlias::F
@@ -28127,6 +32153,7 @@
                   dynamic
     typeAliases
       functionTypeAliasBased F @13
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           contravariant T @15
             defaultType: dynamic
@@ -28138,6 +32165,7 @@
           returnType: void
     functions
       defaultF @30
+        reference: <thisLibrary>::<definingUnit>::@function::defaultF
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @39
@@ -28160,27 +32188,35 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const @21
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @34
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         methods
           foo @45
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               optionalNamed default a @50
+                reference: <thisLibrary>::<definingUnit>::@class::B::@method::foo::@parameter::a
                 type: dynamic
                 constantInitializer
                   InstanceCreationExpression
@@ -28221,10 +32257,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional g @8
@@ -28242,10 +32281,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           optionalPositional default compare @22
@@ -28276,13 +32318,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           optionalNamed default x @28
+            reference: <thisLibrary>::<definingUnit>::@function::f::@parameter::x
             type: ({int f1, bool f2})
             constantInitializer
               RecordLiteral
@@ -28320,13 +32366,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           optionalNamed default x @28
+            reference: <thisLibrary>::<definingUnit>::@function::f::@parameter::x
             type: ({int f1, bool f2})
             constantInitializer
               RecordLiteral
@@ -28365,13 +32415,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           optionalNamed default x @20
+            reference: <thisLibrary>::<definingUnit>::@function::f::@parameter::x
             type: (int, bool)
             constantInitializer
               RecordLiteral
@@ -28395,13 +32449,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           optionalNamed default x @20
+            reference: <thisLibrary>::<definingUnit>::@function::f::@parameter::x
             type: (int, bool)
             constantInitializer
               RecordLiteral
@@ -28430,23 +32488,30 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     extensions
       E @21
+        reference: <thisLibrary>::<definingUnit>::@extension::E
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: A
         methods
           static f @44
+            reference: <thisLibrary>::<definingUnit>::@extension::E::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::E
             returnType: void
           static g @65
+            reference: <thisLibrary>::<definingUnit>::@extension::E::@method::g
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::E
             parameters
               optionalPositional default p @75
@@ -28471,10 +32536,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class B @6
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T1 @8
@@ -28483,14 +32551,18 @@
             defaultType: dynamic
         constructors
           const @26
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
       class C @39
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           foo @50
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               optionalPositional default b @70
@@ -28525,24 +32597,30 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class B @6
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const @21
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
       class C @34
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @36
             defaultType: dynamic
         constructors
           const @49
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               optionalPositional default b @57
@@ -28577,18 +32655,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @17
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @29
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @31
@@ -28597,8 +32680,10 @@
           A<T>
         constructors
           const @60
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
       class C @73
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @75
@@ -28607,6 +32692,7 @@
           A<Iterable<T>>
         constructors
           const @114
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               optionalPositional default a @122
@@ -28638,19 +32724,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class B @6
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const @21
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
     functions
       foo @33
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @37
@@ -28688,24 +32779,31 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class B @6
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const @21
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
       class C @34
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           foo @45
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             typeParameters
               covariant T @49
@@ -28743,10 +32841,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class B @6
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T1 @8
@@ -28755,17 +32856,21 @@
             defaultType: dynamic
         constructors
           const @26
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
       class C @39
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant E1 @41
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           foo @54
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             typeParameters
               covariant E2 @58
@@ -28803,27 +32908,34 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class B @6
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const @21
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
       class C @34
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @36
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           foo @48
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               optionalPositional default b @58
@@ -28864,7 +32976,7 @@
   static const f22 = f21;
 }
 ''');
-    configuration.withReferences = true;
+
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -28990,7 +33102,7 @@
   A.named();
 }
 ''');
-    configuration.withReferences = true;
+
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -29022,9 +33134,7 @@
   double foo;
 }
 ''');
-    configuration
-      ..withPropertyLinking = true
-      ..withReferences = true;
+    configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -29095,7 +33205,7 @@
   void foo() {}
 }
 ''');
-    configuration.withReferences = true;
+
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -29132,26 +33242,34 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @17
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
       class alias X @28
+        reference: <thisLibrary>::<definingUnit>::@class::X::@def::0
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         mixins
           M
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@def::0::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X::@def::0
             constantInitializers
               SuperConstructorInvocation
@@ -29162,12 +33280,14 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
       class alias X @48
+        reference: <thisLibrary>::<definingUnit>::@class::X::@def::1
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: B
         mixins
           M
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@def::1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X::@def::1
             constantInitializers
               SuperConstructorInvocation
@@ -29179,6 +33299,7 @@
             superConstructor: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
     mixins
       mixin M @68
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -29190,7 +33311,7 @@
 enum E {a, b}
 enum E {c, d, e}
 ''');
-    configuration.withReferences = true;
+
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -29384,7 +33505,7 @@
   static var y = 0;
 }
 ''');
-    configuration.withReferences = true;
+
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -29447,7 +33568,7 @@
 extension type E(int it) {}
 extension type E(double it) {}
 ''');
-    configuration.withReferences = true;
+
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -29512,7 +33633,7 @@
 void f(int a) {}
 void f([int b, double c]) {}
 ''');
-    configuration.withReferences = true;
+
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -29547,7 +33668,7 @@
     var library = await buildLibrary(r'''
 void f({int a, double a}) {}
 ''');
-    configuration.withReferences = true;
+
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -29575,7 +33696,7 @@
 typedef void F(int a);
 typedef void F([int b, double c]);
 ''');
-    configuration.withReferences = true;
+
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -29619,7 +33740,7 @@
   var y = 0;
 }
 ''');
-    configuration.withReferences = true;
+
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -29687,9 +33808,7 @@
 final x = 1;
 var x = 2.3;
 ''');
-    configuration
-      ..withPropertyLinking = true
-      ..withReferences = true;
+    configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -29698,28 +33817,28 @@
     enclosingElement: <thisLibrary>
     topLevelVariables
       static x @5
-        reference: <thisLibrary>::<definingUnit>::@variable::x::@def::0
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x::@def::0
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         id: variable_0
         getter: getter_0
         setter: setter_0
       static x @12
-        reference: <thisLibrary>::<definingUnit>::@variable::x::@def::1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x::@def::1
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         id: variable_1
         getter: getter_1
         setter: setter_1
       static final x @21
-        reference: <thisLibrary>::<definingUnit>::@variable::x::@def::2
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x::@def::2
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
         id: variable_2
         getter: getter_2
       static x @32
-        reference: <thisLibrary>::<definingUnit>::@variable::x::@def::3
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x::@def::3
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
@@ -29786,9 +33905,7 @@
 int get foo {}
 double get foo {}
 ''');
-    configuration
-      ..withPropertyLinking = true
-      ..withReferences = true;
+    configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -29797,7 +33914,7 @@
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static foo @-1
-        reference: <thisLibrary>::<definingUnit>::@variable::foo
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         id: variable_0
@@ -29823,9 +33940,7 @@
 set foo(int _) {}
 set foo(double _) {}
 ''');
-    configuration
-      ..withPropertyLinking = true
-      ..withReferences = true;
+    configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -29834,7 +33949,7 @@
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static foo @-1
-        reference: <thisLibrary>::<definingUnit>::@variable::foo
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         id: variable_0
@@ -29870,10 +33985,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @7
@@ -29881,6 +33999,7 @@
         supertype: Enum
         fields
           static const enumConstant int @14
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::int
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E<int>
             shouldUseTypeForInitializerInference: false
@@ -29903,6 +34022,7 @@
                   rightParenthesis: ) @0
                 staticType: E<int>
           static const enumConstant string @22
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::string
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E<String>
             shouldUseTypeForInitializerInference: false
@@ -29924,6 +34044,7 @@
                   rightParenthesis: ) @0
                 staticType: E<String>
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E<dynamic>>
             constantInitializer
@@ -29942,18 +34063,22 @@
                 staticType: List<E<dynamic>>
         constructors
           const @43
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             parameters
               requiredPositional a @47
                 type: T
         accessors
           synthetic static get int @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::int
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E<int>
           synthetic static get string @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::string
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E<String>
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E<dynamic>>
 ''');
@@ -29968,14 +34093,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant _name @11
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::_name
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -29992,6 +34121,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -30006,12 +34136,15 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get _name @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::_name
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
 ''');
@@ -30026,10 +34159,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @7
@@ -30037,6 +34173,7 @@
         supertype: Enum
         fields
           static const enumConstant v @14
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E<double>
             shouldUseTypeForInitializerInference: false
@@ -30067,6 +34204,7 @@
                   rightParenthesis: ) @0
                 staticType: E<double>
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E<dynamic>>
             constantInitializer
@@ -30081,15 +34219,18 @@
                 staticType: List<E<dynamic>>
         constructors
           const @37
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             parameters
               requiredPositional a @41
                 type: T
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E<double>
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E<dynamic>>
 ''');
@@ -30103,14 +34244,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant _ @11
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::_
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -30127,6 +34272,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -30141,12 +34287,15 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get _ @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::_
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
 ''');
@@ -30161,14 +34310,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @11
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -30185,6 +34338,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -30199,16 +34353,20 @@
                 staticType: List<E>
         constructors
           factory named @26
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             periodOffset: 25
             nameEnd: 31
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
 ''');
@@ -30223,14 +34381,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @11
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -30247,6 +34409,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -30261,12 +34424,15 @@
                 staticType: List<E>
         constructors
           factory @24
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
 ''');
@@ -30282,14 +34448,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @11
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -30306,6 +34476,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -30319,10 +34490,12 @@
                 rightBracket: ] @0
                 staticType: List<E>
           final x @22
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: dynamic
         constructors
           const @33
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             parameters
               requiredPositional final this.x @44
@@ -30333,12 +34506,15 @@
                 field: <thisLibrary>::<definingUnit>::@enum::E::@field::x
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: dynamic
 ''');
@@ -30353,7 +34529,7 @@
   const E(this.x);
 }
 ''');
-    configuration.withReferences = true;
+
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -30442,14 +34618,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @11
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -30466,6 +34646,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -30480,6 +34661,7 @@
                 staticType: List<E>
         constructors
           const @22
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             parameters
               requiredPositional final this.x @29
@@ -30487,9 +34669,11 @@
                 field: <null>
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
 ''');
@@ -30505,14 +34689,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @11
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -30529,6 +34717,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -30542,13 +34731,16 @@
                 rightBracket: ] @0
                 staticType: List<E>
           final x @26
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: int
         constructors
           const @37
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             parameters
               optionalNamed default final this.x @45
+                reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new::@parameter::x
                 type: int
                 constantInitializer
                   BinaryExpression
@@ -30565,12 +34757,15 @@
                 field: <thisLibrary>::<definingUnit>::@enum::E::@field::x
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: int
 ''');
@@ -30586,14 +34781,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @11
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -30610,6 +34809,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -30623,10 +34823,12 @@
                 rightBracket: ] @0
                 staticType: List<E>
           final x @26
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: num
         constructors
           const @37
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             parameters
               requiredPositional final this.x @48
@@ -30634,12 +34836,15 @@
                 field: <thisLibrary>::<definingUnit>::@enum::E::@field::x
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: num
 ''');
@@ -30655,14 +34860,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @11
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -30679,6 +34888,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -30692,10 +34902,12 @@
                 rightBracket: ] @0
                 staticType: List<E>
           final x @22
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: dynamic
         constructors
           @27
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             parameters
               requiredPositional final this.x @38
@@ -30703,12 +34915,15 @@
                 field: <thisLibrary>::<definingUnit>::@enum::E::@field::x
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: dynamic
 ''');
@@ -30724,14 +34939,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @11
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -30748,6 +34967,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -30761,10 +34981,12 @@
                 rightBracket: ] @0
                 staticType: List<E>
           final x @22
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: dynamic
         constructors
           @27
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             parameters
               requiredPositional final this.x @34
@@ -30772,12 +34994,15 @@
                 field: <thisLibrary>::<definingUnit>::@enum::E::@field::x
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: dynamic
 ''');
@@ -30792,14 +35017,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @11
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -30825,6 +35054,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -30839,6 +35069,7 @@
                 staticType: List<E>
         constructors
           const named @34
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             periodOffset: 33
             nameEnd: 39
@@ -30847,9 +35078,11 @@
                 type: int
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
 ''');
@@ -30864,14 +35097,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @11
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -30892,6 +35129,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -30906,15 +35144,18 @@
                 staticType: List<E>
         constructors
           const @26
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             parameters
               requiredPositional a @32
                 type: int
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
 ''');
@@ -30930,10 +35171,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @7
@@ -30941,6 +35185,7 @@
         supertype: Enum
         fields
           static const enumConstant v @14
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E<dynamic>
             shouldUseTypeForInitializerInference: false
@@ -30959,6 +35204,7 @@
                   rightParenthesis: ) @0
                 staticType: E<dynamic>
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E<dynamic>>
             constantInitializer
@@ -30972,10 +35218,12 @@
                 rightBracket: ] @0
                 staticType: List<E<dynamic>>
           final x @29
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: int
         constructors
           const @40
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             parameters
               requiredPositional a @45
@@ -31007,12 +35255,15 @@
                   staticType: int
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E<dynamic>
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E<dynamic>>
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: int
 ''');
@@ -31027,15 +35278,19 @@
 enum E { v }''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @65
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /**\n * Docs\n */
         supertype: Enum
         fields
           static const enumConstant v @69
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -31052,6 +35307,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -31066,12 +35322,15 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
 ''');
@@ -31086,14 +35345,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @11
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -31110,6 +35373,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -31123,6 +35387,7 @@
                 rightBracket: ] @0
                 staticType: List<E>
           final foo @22
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: int
             shouldUseTypeForInitializerInference: false
@@ -31132,15 +35397,19 @@
                 staticType: int
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: int
 ''');
@@ -31160,14 +35429,18 @@
     );
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           final promotable _foo @33
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: int?
 ''');
@@ -31182,14 +35455,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @10
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -31206,6 +35483,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -31219,19 +35497,24 @@
                 rightBracket: ] @0
                 staticType: List<E>
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: int
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
           get foo @23
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: int
 ''');
@@ -31246,22 +35529,28 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class I @6
+        reference: <thisLibrary>::<definingUnit>::@class::I
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I
     enums
       enum E @16
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         interfaces
           I
         fields
           static const enumConstant v @35
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -31278,6 +35567,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -31292,12 +35582,15 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
 ''');
@@ -31315,15 +35608,20 @@
       ..withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
       class C @45
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
     enums
       enum E @55
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         interfaces
@@ -31331,31 +35629,38 @@
           C
         fields
           static const enumConstant v @78
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
     extensionTypes
       B @26
+        reference: <thisLibrary>::<definingUnit>::@extensionType::B
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::B::@constructor::new
         typeErasure: int
         fields
           final it @32
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             returnType: int
 ''');
@@ -31370,19 +35675,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class I @6
+        reference: <thisLibrary>::<definingUnit>::@class::I
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I
     enums
       enum E @19
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant U @21
@@ -31392,6 +35702,7 @@
           I<U>
         fields
           static const enumConstant v @44
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E<dynamic>
             shouldUseTypeForInitializerInference: false
@@ -31410,6 +35721,7 @@
                   rightParenthesis: ) @0
                 staticType: E<dynamic>
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E<dynamic>>
             constantInitializer
@@ -31424,12 +35736,15 @@
                 staticType: List<E<dynamic>>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E<dynamic>
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E<dynamic>>
 ''');
@@ -31445,21 +35760,28 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class X @6
+        reference: <thisLibrary>::<definingUnit>::@class::X
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
       class Z @17
+        reference: <thisLibrary>::<definingUnit>::@class::Z
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::Z::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::Z
     enums
       enum E @27
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         interfaces
@@ -31467,6 +35789,7 @@
           Z
         fields
           static const enumConstant v @52
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -31483,6 +35806,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -31497,12 +35821,15 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
 ''');
@@ -31517,10 +35844,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @7
@@ -31528,6 +35858,7 @@
         supertype: Enum
         fields
           static const enumConstant v @14
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E<dynamic>
             shouldUseTypeForInitializerInference: false
@@ -31546,6 +35877,7 @@
                   rightParenthesis: ) @0
                 staticType: E<dynamic>
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E<dynamic>>
             constantInitializer
@@ -31560,16 +35892,20 @@
                 staticType: List<E<dynamic>>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E<dynamic>
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E<dynamic>>
         methods
           foo @23
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             typeParameters
               covariant U @27
@@ -31592,14 +35928,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @11
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -31616,6 +35956,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -31630,16 +35971,20 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
         methods
           toString @23
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@method::toString
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: String
 ''');
@@ -31654,16 +35999,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @16
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         mixins
           M
         fields
           static const enumConstant v @29
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -31680,6 +36029,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -31694,16 +36044,20 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -31722,15 +36076,20 @@
       ..withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
       class C @45
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
     enums
       enum E @55
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         mixins
@@ -31738,31 +36097,38 @@
           C
         fields
           static const enumConstant v @72
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
     extensionTypes
       B @26
+        reference: <thisLibrary>::<definingUnit>::@extensionType::B
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::B::@constructor::new
         typeErasure: int
         fields
           final it @32
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             returnType: int
 ''');
@@ -31778,10 +36144,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @44
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         mixins
@@ -31789,6 +36158,7 @@
           M2<int>
         fields
           static const enumConstant v @67
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -31805,6 +36175,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -31819,16 +36190,20 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
     mixins
       mixin M1 @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M1
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @9
@@ -31836,6 +36211,7 @@
         superclassConstraints
           Object
       mixin M2 @21
+        reference: <thisLibrary>::<definingUnit>::@mixin::M2
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @24
@@ -31854,14 +36230,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @10
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -31878,6 +36258,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -31891,19 +36272,24 @@
                 rightBracket: ] @0
                 staticType: List<E>
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: int
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
           set foo= @19
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             parameters
               requiredPositional _ @27
@@ -31920,10 +36306,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @7
@@ -31931,6 +36320,7 @@
         supertype: Enum
         fields
           static const enumConstant v @14
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E<dynamic>
             shouldUseTypeForInitializerInference: false
@@ -31949,6 +36339,7 @@
                   rightParenthesis: ) @0
                 staticType: E<dynamic>
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E<dynamic>>
             constantInitializer
@@ -31963,12 +36354,15 @@
                 staticType: List<E<dynamic>>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E<dynamic>
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E<dynamic>>
 ''');
@@ -31982,10 +36376,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       notSimplyBounded enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @7
@@ -31997,6 +36394,7 @@
         supertype: Enum
         fields
           static const enumConstant v @39
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E<num, num>
             shouldUseTypeForInitializerInference: false
@@ -32015,6 +36413,7 @@
                   rightParenthesis: ) @0
                 staticType: E<num, num>
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E<num, num>>
             constantInitializer
@@ -32029,12 +36428,15 @@
                 staticType: List<E<num, num>>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E<num, num>
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E<num, num>>
 ''');
@@ -32046,10 +36448,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       notSimplyBounded enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @7
@@ -32058,6 +36463,7 @@
         supertype: Enum
         fields
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E<dynamic>>
             constantInitializer
@@ -32067,9 +36473,11 @@
                 staticType: List<E<dynamic>>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E<dynamic>>
 ''');
@@ -32081,10 +36489,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       notSimplyBounded enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @7
@@ -32099,6 +36510,7 @@
         supertype: Enum
         fields
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E<dynamic, num, dynamic>>
             constantInitializer
@@ -32108,9 +36520,11 @@
                 staticType: List<E<dynamic, num, dynamic>>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E<dynamic, num, dynamic>>
 ''');
@@ -32122,10 +36536,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       notSimplyBounded enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @7
@@ -32134,6 +36551,7 @@
         supertype: Enum
         fields
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E<dynamic>>
             constantInitializer
@@ -32143,9 +36561,11 @@
                 staticType: List<E<dynamic>>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E<dynamic>>
 ''');
@@ -32157,10 +36577,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           contravariant T @10
@@ -32168,6 +36591,7 @@
         supertype: Enum
         fields
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E<dynamic>>
             constantInitializer
@@ -32177,9 +36601,11 @@
                 staticType: List<E<dynamic>>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E<dynamic>>
 ''');
@@ -32191,10 +36617,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @11
@@ -32202,6 +36631,7 @@
         supertype: Enum
         fields
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E<dynamic>>
             constantInitializer
@@ -32211,9 +36641,11 @@
                 staticType: List<E<dynamic>>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E<dynamic>>
 ''');
@@ -32225,10 +36657,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           invariant T @13
@@ -32236,6 +36671,7 @@
         supertype: Enum
         fields
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E<dynamic>>
             constantInitializer
@@ -32245,9 +36681,11 @@
                 staticType: List<E<dynamic>>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E<dynamic>>
 ''');
@@ -32259,10 +36697,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           invariant T @13
@@ -32274,6 +36715,7 @@
         supertype: Enum
         fields
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E<dynamic, dynamic, dynamic>>
             constantInitializer
@@ -32283,9 +36725,11 @@
                 staticType: List<E<dynamic, dynamic, dynamic>>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E<dynamic, dynamic, dynamic>>
 ''');
@@ -32303,14 +36747,18 @@
 }''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant a @32
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             documentationComment: /**\n   * aaa\n   */
             type: E
@@ -32328,6 +36776,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           static const enumConstant b @47
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::b
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             documentationComment: /// bbb
             type: E
@@ -32345,6 +36794,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -32363,15 +36813,19 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get a @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get b @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
 ''');
@@ -32394,14 +36848,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant a @46
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             documentationComment: /**\n   * aaa\n   */
             metadata
@@ -32427,6 +36885,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           static const enumConstant b @75
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::b
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             documentationComment: /// bbb
             metadata
@@ -32452,6 +36911,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -32470,19 +36930,24 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get a @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get b @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
     topLevelVariables
       static const annotation @91
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::annotation
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
@@ -32492,6 +36957,7 @@
             staticType: int
     accessors
       synthetic static get annotation @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::annotation
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -32501,14 +36967,18 @@
     var library = await buildLibrary('enum E { v1, v2 }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v1 @9
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -32525,6 +36995,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           static const enumConstant v2 @13
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v2
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -32541,6 +37012,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -32559,15 +37031,19 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v1 @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get v2 @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v2
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
 ''');
@@ -32577,14 +37053,18 @@
     var library = await buildLibrary('enum E1 { v1 } enum E2 { v2 }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E1 @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E1
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v1 @10
+            reference: <thisLibrary>::<definingUnit>::@enum::E1::@field::v1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E1
             type: E1
             shouldUseTypeForInitializerInference: false
@@ -32601,6 +37081,7 @@
                   rightParenthesis: ) @0
                 staticType: E1
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E1::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E1
             type: List<E1>
             constantInitializer
@@ -32615,19 +37096,24 @@
                 staticType: List<E1>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E1
         accessors
           synthetic static get v1 @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E1::@getter::v1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E1
             returnType: E1
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E1::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E1
             returnType: List<E1>
       enum E2 @20
+        reference: <thisLibrary>::<definingUnit>::@enum::E2
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v2 @25
+            reference: <thisLibrary>::<definingUnit>::@enum::E2::@field::v2
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E2
             type: E2
             shouldUseTypeForInitializerInference: false
@@ -32644,6 +37130,7 @@
                   rightParenthesis: ) @0
                 staticType: E2
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E2::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E2
             type: List<E2>
             constantInitializer
@@ -32658,12 +37145,15 @@
                 staticType: List<E2>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E2::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E2
         accessors
           synthetic static get v2 @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E2::@getter::v2
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E2
             returnType: E2
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E2::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E2
             returnType: List<E2>
 ''');
@@ -32691,53 +37181,68 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class M @24
+        reference: <thisLibrary>::<definingUnit>::@class::M
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::M::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::M
       class A @36
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           foo @52
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: dynamic
       class B @70
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           M
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         methods
           foo @92
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: dynamic
       class C @110
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Object
         mixins
           M
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           foo @141
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
       class alias D @159
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Object
         mixins
           M
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             constantInitializers
               SuperConstructorInvocation
@@ -32748,10 +37253,12 @@
                 staticElement: dart:core::<definingUnit>::@class::Object::@constructor::new
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant a @8
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -32768,6 +37275,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           static const enumConstant b @11
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::b
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -32784,6 +37292,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           static const enumConstant c @14
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::c
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -32800,6 +37309,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -32822,18 +37332,23 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get a @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get b @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get c @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::c
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
 ''');
@@ -32846,10 +37361,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: dynamic Function(int)
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -32858,6 +37376,7 @@
           returnType: dynamic
     functions
       main @18
+        reference: <thisLibrary>::<definingUnit>::@function::main
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional f @25
@@ -32873,10 +37392,12 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -32898,10 +37419,12 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -32928,10 +37451,12 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/foo.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/foo.dart
@@ -32961,10 +37486,12 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/foo_io.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/foo_io.dart
@@ -32994,10 +37521,12 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/foo_html.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/foo_html.dart
@@ -33024,19 +37553,23 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class X @23
+        reference: <thisLibrary>::<definingUnit>::@class::X
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
   exportedReferences
     exported[(0, 0)] package:test/a.dart::<definingUnit>::@class::A
@@ -33053,10 +37586,12 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -33073,10 +37608,12 @@
     var library = await buildLibrary('export "a.dart";');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -33097,12 +37634,14 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
       combinators
         hide: A, C
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -33131,6 +37670,7 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
@@ -33138,6 +37678,7 @@
         hide: A
         show: C
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -33176,12 +37717,14 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/b.dart
       enclosingElement: <thisLibrary>
     package:test/c.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/b.dart
@@ -33190,9 +37733,11 @@
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class X @40
+        reference: <thisLibrary>::<definingUnit>::@class::X
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
   exportedReferences
     exported[(0, 0), (0, 1)] package:test/a.dart::<definingUnit>::@class::A
@@ -33213,10 +37758,12 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -33241,12 +37788,14 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
       combinators
         show: A, C
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -33271,12 +37820,14 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
       combinators
         show: f
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -33298,10 +37849,12 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -33328,10 +37881,12 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -33351,10 +37906,12 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -33372,10 +37929,12 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -33405,20 +37964,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/bar.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/bar.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class B @25
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: package:test/foo.dart::<definingUnit>::@class::A::@constructor::new
 ''');
@@ -33445,20 +38008,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/bar.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/bar.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class B @25
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: package:test/foo_io.dart::<definingUnit>::@class::A::@constructor::new
 ''');
@@ -33485,20 +38052,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/bar.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/bar.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class B @25
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: package:test/foo_html.dart::<definingUnit>::@class::A::@constructor::new
 ''');
@@ -33513,12 +38084,14 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
     package:test/b.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -33543,30 +38116,39 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         augmented
           constructors
             <thisLibrary>::<definingUnit>::@class::A::@constructor::new
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           augment class A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
           class B @54
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::B::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::B
   exportedReferences
     declared <thisLibrary>::@augmentation::package:test/a.dart::@class::B
@@ -33605,31 +38187,39 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class X @56
+        reference: <thisLibrary>::<definingUnit>::@class::X
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
   augmentationImports
     package:test/d.dart
+      reference: <thisLibrary>::@augmentation::package:test/d.dart
       exports
         package:test/a.dart
           enclosingElement: <thisLibrary>::@augmentation::package:test/d.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/d.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/d.dart
         libraryExports
           package:test/a.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/d.dart
     package:test/e.dart
+      reference: <thisLibrary>::@augmentation::package:test/e.dart
       exports
         package:test/b.dart
           enclosingElement: <thisLibrary>::@augmentation::package:test/e.dart
         package:test/c.dart
           enclosingElement: <thisLibrary>::@augmentation::package:test/e.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/e.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/e.dart
         libraryExports
           package:test/b.dart
@@ -33669,22 +38259,28 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class X @31
+        reference: <thisLibrary>::<definingUnit>::@class::X
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       exports
         package:test/a.dart
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
           combinators
             hide: A2, A4
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         libraryExports
           package:test/a.dart
@@ -33719,22 +38315,28 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class X @31
+        reference: <thisLibrary>::<definingUnit>::@class::X
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       exports
         package:test/a.dart
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
           combinators
             show: A1, A3
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         libraryExports
           package:test/a.dart
@@ -33765,10 +38367,13 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
@@ -33778,13 +38383,17 @@
             Object
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
           mixin B @54
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixin::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             superclassConstraints
               Object
@@ -33814,33 +38423,45 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @31
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           class A @60
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::A::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::A
       augmentationImports
         package:test/b.dart
+          reference: <thisLibrary>::@augmentation::package:test/b.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/b.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             classes
               class B @32
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@class::B
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 constructors
                   synthetic @-1
+                    reference: <thisLibrary>::@augmentation::package:test/b.dart::@class::B::@constructor::new
                     enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@class::B
   exportedReferences
     declared <thisLibrary>::@augmentation::package:test/a.dart::@class::A
@@ -33876,30 +38497,38 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class X @31
+        reference: <thisLibrary>::<definingUnit>::@class::X
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
   augmentationImports
     package:test/c.dart
+      reference: <thisLibrary>::@augmentation::package:test/c.dart
       exports
         package:test/a.dart
           enclosingElement: <thisLibrary>::@augmentation::package:test/c.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/c.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/c.dart
         libraryExports
           package:test/a.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/c.dart
       augmentationImports
         package:test/d.dart
+          reference: <thisLibrary>::@augmentation::package:test/d.dart
           exports
             package:test/b.dart
               enclosingElement: <thisLibrary>::@augmentation::package:test/d.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/d.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/d.dart
             libraryExports
               package:test/b.dart
@@ -33926,22 +38555,29 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         topLevelVariables
           static a @33
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@topLevelVariable::a
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             type: int
             shouldUseTypeForInitializerInference: true
         accessors
           synthetic static get a @-1
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@getter::a
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             returnType: int
           synthetic static set a= @-1
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@setter::a
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             parameters
               requiredPositional _a @-1
@@ -33967,14 +38603,19 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         topLevelVariables
           static const a @35
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@topLevelVariable::a
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             type: int
             shouldUseTypeForInitializerInference: false
@@ -33984,6 +38625,7 @@
                 staticType: int
         accessors
           synthetic static get a @-1
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@getter::a
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             returnType: int
   exportedReferences
@@ -34001,24 +38643,30 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         fields
           final f @21
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: InvalidType
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: InvalidType
 ''');
@@ -34032,10 +38680,13 @@
 extension E on int {}''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       E @34
+        reference: <thisLibrary>::<definingUnit>::@extension::E
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// aaa\n/// bbbb\n/// cc
         extendedType: int
@@ -34049,14 +38700,18 @@
 }''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       E @10
+        reference: <thisLibrary>::<definingUnit>::@extension::E
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         fields
           static const x @36
+            reference: <thisLibrary>::<definingUnit>::@extension::E::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::E
             type: int
             shouldUseTypeForInitializerInference: false
@@ -34066,6 +38721,7 @@
                 staticType: int
         accessors
           synthetic static get x @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::E::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::E
             returnType: int
 ''');
@@ -34077,10 +38733,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       E @10
+        reference: <thisLibrary>::<definingUnit>::@extension::E
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @12
@@ -34096,10 +38755,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       E @10
+        reference: <thisLibrary>::<definingUnit>::@extension::E
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @12
@@ -34115,16 +38777,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async
         enclosingElement: <thisLibrary>::<definingUnit>
     functions
       f @28 async
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Future<dynamic>
 ''');
@@ -34137,16 +38802,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async
         enclosingElement: <thisLibrary>::<definingUnit>
     functions
       f @28 async*
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Stream<dynamic>
 ''');
@@ -34161,10 +38829,13 @@
 f() {}''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @60
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /**\n * Docs\n */
         returnType: dynamic
@@ -34175,10 +38846,13 @@
     var library = await buildLibrary('main() {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       main @0
+        reference: <thisLibrary>::<definingUnit>::@function::main
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -34189,10 +38863,12 @@
     var library = await buildLibrary('export "a.dart";');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -34205,12 +38881,14 @@
     var library = await buildLibrary('export "a.dart" hide main;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
       combinators
         hide: main
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -34227,13 +38905,17 @@
 library
   name: my.lib
   nameOffset: 8
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   parts
     package:test/a.dart
+      reference: <thisLibrary>::@unit::package:test/a.dart
       enclosingElement: <thisLibrary>
       functions
         main @16
+          reference: <thisLibrary>::@unit::package:test/a.dart::@function::main
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           returnType: dynamic
 ''');
@@ -34243,10 +38925,13 @@
     var library = await buildLibrary('external f();');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       external f @9
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -34274,10 +38959,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional x @13
@@ -34292,10 +38980,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional final this.a @16
@@ -34311,13 +39002,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           optionalNamed default final this.a @17
+            reference: <thisLibrary>::<definingUnit>::@function::f::@parameter::a
             type: int
             constantInitializer
               IntegerLiteral
@@ -34334,10 +39029,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional final this.a @16
@@ -34354,10 +39052,13 @@
     var library = await buildLibrary('f(final x) {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @0
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional final x @8
@@ -34370,13 +39071,17 @@
     var library = await buildLibrary('f({x}) {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @0
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           optionalNamed default x @3
+            reference: <thisLibrary>::<definingUnit>::@function::f::@parameter::x
             type: dynamic
         returnType: dynamic
 ''');
@@ -34386,10 +39091,13 @@
     var library = await buildLibrary('f([x]) {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @0
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           optionalPositional default x @3
@@ -34402,10 +39110,13 @@
     var library = await buildLibrary('f(x) {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @0
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional x @2
@@ -34418,10 +39129,13 @@
     var library = await buildLibrary('f(g(x, y)) {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @0
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional g @2
@@ -34439,10 +39153,13 @@
     var library = await buildLibrary('f(int g()) {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @0
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional g @6
@@ -34455,10 +39172,13 @@
     var library = await buildLibrary('f(void g()) {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @0
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional g @7
@@ -34471,10 +39191,13 @@
     var library = await buildLibrary('f(int i) {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @0
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional i @6
@@ -34489,10 +39212,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @7
@@ -34510,10 +39236,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @9
@@ -34526,10 +39255,13 @@
     var library = await buildLibrary('f(x, y) {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @0
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional x @2
@@ -34544,10 +39276,13 @@
     var library = await buildLibrary('f() => null;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @0
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -34559,10 +39294,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @2
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: InvalidType
 ''');
@@ -34572,10 +39310,13 @@
     var library = await buildLibrary('void f() {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: void
 ''');
@@ -34587,10 +39328,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @4
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -34602,10 +39346,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @2
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @4
@@ -34618,10 +39365,13 @@
     var library = await buildLibrary('void f<T, U>(T x(U u)) {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @7
@@ -34652,10 +39402,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @7
@@ -34671,10 +39424,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @7
@@ -34687,13 +39443,17 @@
     var library = await buildLibrary('f() {} g() {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @0
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       g @7
+        reference: <thisLibrary>::<definingUnit>::@function::g
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -34738,10 +39498,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @13
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           contravariant T @15
             defaultType: dynamic
@@ -34761,10 +39524,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F1 @13
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F1
         typeParameters
           contravariant T @16
             defaultType: dynamic
@@ -34775,6 +39541,7 @@
               type: T
           returnType: void
       functionTypeAliasBased F2 @39
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F2
         typeParameters
           contravariant T @42
             defaultType: dynamic
@@ -34794,10 +39561,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F2 @14
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F2
         typeParameters
           contravariant T @17
             defaultType: dynamic
@@ -34808,6 +39578,7 @@
               typeArguments
                 T
       functionTypeAliasBased F1 @36
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F1
         typeParameters
           contravariant T @39
             defaultType: dynamic
@@ -34826,10 +39597,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @10
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           covariant T @12
             defaultType: dynamic
@@ -34845,10 +39619,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @16
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           covariant T @18
             defaultType: dynamic
@@ -34865,10 +39642,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F1 @10
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F1
         typeParameters
           covariant T @13
             defaultType: dynamic
@@ -34876,6 +39656,7 @@
         aliasedElement: GenericFunctionTypeElement
           returnType: T
       functionTypeAliasBased F2 @33
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F2
         typeParameters
           covariant T @36
             defaultType: dynamic
@@ -34895,10 +39676,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F1 @13
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F1
         typeParameters
           contravariant T @16
             defaultType: dynamic
@@ -34909,6 +39693,7 @@
               type: T
           returnType: void
       functionTypeAliasBased F2 @38
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F2
         typeParameters
           covariant T @41
             defaultType: dynamic
@@ -34930,10 +39715,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @10
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           invariant T @12
             defaultType: dynamic
@@ -34953,10 +39741,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F1 @10
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F1
         typeParameters
           covariant T @13
             defaultType: dynamic
@@ -34964,6 +39755,7 @@
         aliasedElement: GenericFunctionTypeElement
           returnType: T
       functionTypeAliasBased F2 @33
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F2
         typeParameters
           invariant T @36
             defaultType: dynamic
@@ -34985,10 +39777,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @13
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           unrelated T @15
             defaultType: dynamic
@@ -35005,23 +39800,28 @@
     var library = await buildLibrary('import "dart:async"; FutureOr<int> x;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static x @35
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: FutureOr<int>
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: FutureOr<int>
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -35038,16 +39838,19 @@
         await buildLibrary('import "dart:async"; const x = FutureOr;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const x @27
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Type
         shouldUseTypeForInitializerInference: false
@@ -35058,6 +39861,7 @@
             staticType: Type
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Type
 ''');
@@ -35077,37 +39881,45 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static x @52
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: FutureOr<int>
         shouldUseTypeForInitializerInference: false
       static y @65
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::y
         enclosingElement: <thisLibrary>::<definingUnit>
         type: InvalidType
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: FutureOr<int>
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
             type: FutureOr<int>
         returnType: void
       synthetic static get y @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::y
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: InvalidType
       synthetic static set y= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::y
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _y @-1
@@ -35115,6 +39927,7 @@
         returnType: void
     functions
       f @35
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: FutureOr<int>
 ''');
@@ -35134,17 +39947,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static f @16
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: void Function()
     accessors
       synthetic static get f @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: void Function()
       synthetic static set f= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _f @-1
@@ -35159,17 +39977,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static f @17
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: void Function()?
     accessors
       synthetic static get f @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: void Function()?
       synthetic static set f= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _f @-1
@@ -35189,10 +40012,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -35201,9 +40027,11 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           static m @30
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             typeParameters
               covariant V @32
@@ -35225,10 +40053,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @30
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function(int, String)
 ''');
@@ -35240,10 +40071,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional p @37
@@ -35261,10 +40095,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: void Function(String) Function(int)
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -35282,16 +40119,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           m @42
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int Function(int, String)
 ''');
@@ -35303,10 +40145,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional p @37
@@ -35321,17 +40166,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static v @30
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int Function(int, String)
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function(int, String)
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -35351,18 +40201,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const @21
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @64
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -35408,6 +40263,7 @@
               substitution: {T: int Function(String)}
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
 ''');
   }
@@ -35423,19 +40279,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const @21
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     topLevelVariables
       static v @62
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -35483,9 +40344,11 @@
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -35504,19 +40367,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const @21
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     topLevelVariables
       static const v @35
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: A<String Function({int? a})>
         shouldUseTypeForInitializerInference: false
@@ -35571,6 +40439,7 @@
             staticType: A<String Function({int? a})>
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A<String Function({int? a})>
 ''');
@@ -35586,19 +40455,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const @21
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     topLevelVariables
       static const v @35
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: A<String Function([int?])>
         shouldUseTypeForInitializerInference: false
@@ -35653,6 +40527,7 @@
             staticType: A<String Function([int?])>
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A<String Function([int?])>
 ''');
@@ -35668,19 +40543,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const @21
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     topLevelVariables
       static const v @35
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: A<String Function({required int a})>
         shouldUseTypeForInitializerInference: false
@@ -35735,6 +40615,7 @@
             staticType: A<String Function({required int a})>
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A<String Function({required int a})>
 ''');
@@ -35750,19 +40631,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const @21
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     topLevelVariables
       static const v @35
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: A<String Function(int)>
         shouldUseTypeForInitializerInference: false
@@ -35811,6 +40697,7 @@
             staticType: A<String Function(int)>
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A<String Function(int)>
 ''');
@@ -35822,10 +40709,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin B @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant X @8
@@ -35844,24 +40734,30 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class alias B @31
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A<void Function()>
         mixins
           M
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             constantInitializers
               SuperConstructorInvocation
@@ -35875,6 +40771,7 @@
               substitution: {T: void Function()}
     mixins
       mixin M @20
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -35888,10 +40785,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       F1 @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F1
         aliasedType: dynamic Function<V1>(V1 Function())
         aliasedElement: GenericFunctionTypeElement
           typeParameters
@@ -35904,6 +40804,7 @@
                     V1
           returnType: dynamic
       F2 @43
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F2
         typeParameters
           covariant V2 @46
             defaultType: dynamic
@@ -35944,10 +40845,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       notSimplyBounded F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           unrelated X @10
             bound: dynamic
@@ -35967,14 +40871,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static foo @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Future<int>
     accessors
       static get foo @16 async
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Future<int>
 ''');
@@ -35987,20 +40895,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       synthetic static foo @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Stream<int>
     accessors
       static get foo @37 async*
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Stream<int>
 ''');
@@ -36015,14 +40927,18 @@
 get x => null;''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static x @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
     accessors
       static get x @64
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /**\n * Docs\n */
         returnType: dynamic
@@ -36033,14 +40949,18 @@
     var library = await buildLibrary('external int get x;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static x @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
     accessors
       static external get x @17
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -36051,35 +40971,45 @@
         'class C extends D { get f => null; } abstract class D { int get f; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: D
         fields
           synthetic f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
         accessors
           get f @24
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
       abstract class D @52
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
         accessors
           abstract get f @64
+            reference: <thisLibrary>::<definingUnit>::@class::D::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             returnType: int
 ''');
@@ -36091,14 +41021,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static foo @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Iterator<int>
     accessors
       static get foo @18 sync*
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Iterator<int>
 ''');
@@ -36108,20 +41042,26 @@
     var library = await buildLibrary('int get x => null; get y => null;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static x @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
       synthetic static y @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::y
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
     accessors
       static get x @8
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       static get y @23
+        reference: <thisLibrary>::<definingUnit>::@getter::y
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -36141,22 +41081,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           call @17
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::call
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: void
       class D @36
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @48
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             parameters
               requiredPositional c @52
@@ -36183,6 +41130,7 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::D::@constructor::named
             redirectedConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::named
           const named @83
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             periodOffset: 82
             nameEnd: 88
@@ -36202,17 +41150,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final x @25
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: Object
         constructors
           const named @38
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 37
             nameEnd: 43
@@ -36222,10 +41175,12 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: Object
     topLevelVariables
       static const x @61
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
         shouldUseTypeForInitializerInference: false
@@ -36252,6 +41207,7 @@
             staticType: C
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
 ''');
@@ -36260,9 +41216,7 @@
   test_implicitTopLevelVariable_getterFirst() async {
     var library =
         await buildLibrary('int get x => 0; void set x(int value) {}');
-    configuration
-      ..withPropertyLinking = true
-      ..withReferences = true;
+    configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -36271,7 +41225,7 @@
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static x @-1
-        reference: <thisLibrary>::<definingUnit>::@variable::x
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         id: variable_0
@@ -36301,20 +41255,25 @@
         await buildLibrary('void set x(int value) {} int get x => 0;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static x @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
     accessors
       static set x= @9
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional value @15
             type: int
         returnType: void
       static get x @33
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -36336,20 +41295,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class B @104
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: package:test/foo.dart::<definingUnit>::@class::A::@constructor::new
 ''');
@@ -36374,20 +41337,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo_io.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo_io.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class B @104
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: package:test/foo_io.dart::<definingUnit>::@class::A::@constructor::new
 ''');
@@ -36412,20 +41379,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo_io.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo_io.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class B @124
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: package:test/foo_io.dart::<definingUnit>::@class::A::@constructor::new
 ''');
@@ -36450,20 +41421,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo_html.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo_html.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class B @104
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: package:test/foo_html.dart::<definingUnit>::@class::A::@constructor::new
 ''');
@@ -36488,20 +41463,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo_html.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo_html.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class B @124
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: package:test/foo_html.dart::<definingUnit>::@class::A::@constructor::new
 ''');
@@ -36516,12 +41495,14 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:core
       enclosingElement: <thisLibrary>
     dart:math
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:core
@@ -36537,10 +41518,12 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:math
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:math
@@ -36555,13 +41538,16 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart deferred as p @28
       enclosingElement: <thisLibrary>
   prefixes
     p @28
+      reference: <thisLibrary>::@prefix::p
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart deferred as p @28
@@ -36580,6 +41566,7 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async as i1 @23
       enclosingElement: <thisLibrary>
@@ -36589,10 +41576,13 @@
       enclosingElement: <thisLibrary>
   prefixes
     i1 @23
+      reference: <thisLibrary>::@prefix::i1
       enclosingElement: <thisLibrary>
     i2 @70
+      reference: <thisLibrary>::@prefix::i2
       enclosingElement: <thisLibrary>
     i3 @117
+      reference: <thisLibrary>::@prefix::i3
       enclosingElement: <thisLibrary>
   exports
     dart:math
@@ -36602,6 +41592,7 @@
     dart:math
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async as i1 @23
@@ -36626,12 +41617,14 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async
       enclosingElement: <thisLibrary>
       combinators
         hide: Stream, Completer
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async
@@ -36640,13 +41633,16 @@
           hide: Stream, Completer
     topLevelVariables
       static f @51
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Future<dynamic>
     accessors
       synthetic static get f @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Future<dynamic>
       synthetic static set f= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _f @-1
@@ -36672,6 +41668,7 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   metadata
     Annotation
       atSign: @ @0
@@ -36692,6 +41689,7 @@
             staticType: null
           element: <null>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       relativeUri 'ht:'
@@ -36706,6 +41704,7 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async
       enclosingElement: <thisLibrary>
@@ -36713,6 +41712,7 @@
         hide: Stream
         show: Future
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async
@@ -36722,13 +41722,16 @@
           show: Future
     topLevelVariables
       static f @52
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Future<dynamic>
     accessors
       synthetic static get f @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Future<dynamic>
       synthetic static set f= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _f @-1
@@ -36746,26 +41749,32 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart as a @19
       enclosingElement: <thisLibrary>
   prefixes
     a @19
+      reference: <thisLibrary>::@prefix::a
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart as a @19
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static c @26
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
@@ -36786,28 +41795,35 @@
     expect(library.libraryImports[1].importedLibrary!.isDartCore, true);
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/test.dart as p @22
       enclosingElement: <thisLibrary>
   prefixes
     p @22
+      reference: <thisLibrary>::@prefix::p
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/test.dart as p @22
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @31
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       class D @42
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: C
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             superConstructor: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
 ''');
@@ -36821,12 +41837,14 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async
       enclosingElement: <thisLibrary>
       combinators
         show: Future, Stream
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async
@@ -36835,25 +41853,31 @@
           show: Future, Stream
     topLevelVariables
       static f @48
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Future<dynamic>
       static s @58
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::s
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Stream<dynamic>
     accessors
       synthetic static get f @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Future<dynamic>
       synthetic static set f= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _f @-1
             type: Future<dynamic>
         returnType: void
       synthetic static get s @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::s
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Stream<dynamic>
       synthetic static set s= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::s
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _s @-1
@@ -36888,12 +41912,14 @@
         await buildLibrary('import "a.dart"; import "b.dart"; C c; D d;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
     package:test/b.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
@@ -36902,25 +41928,31 @@
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static c @36
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
       static d @41
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::d
         enclosingElement: <thisLibrary>::<definingUnit>
         type: D
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
             type: C
         returnType: void
       synthetic static get d @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::d
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: D
       synthetic static set d= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::d
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _d @-1
@@ -36941,16 +41973,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @43
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant V @45
             defaultType: dynamic
         constructors
           const @58
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional f @65
@@ -36959,6 +41995,7 @@
                     typeArguments
                       V
       class D @77
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @79
@@ -36967,9 +42004,11 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
     typeAliases
       F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           covariant T @10
             defaultType: dynamic
@@ -36980,6 +42019,7 @@
           returnType: D<T, U>
     topLevelVariables
       static const x @118
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C<int>
         shouldUseTypeForInitializerInference: false
@@ -37005,10 +42045,12 @@
             staticType: C<int>
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C<int>
     functions
       f @96
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant U @98
@@ -37029,28 +42071,35 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @38
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @50
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional f @54
                 type: D<T> Function<T>()
                   alias: <thisLibrary>::<definingUnit>::@typeAlias::F
       class D @66
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @68
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
     typeAliases
       F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: D<T> Function<T>()
         aliasedElement: GenericFunctionTypeElement
           typeParameters
@@ -37058,6 +42107,7 @@
           returnType: D<T>
     topLevelVariables
       static const x @101
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
         shouldUseTypeForInitializerInference: false
@@ -37081,10 +42131,12 @@
             staticType: C
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
     functions
       f @79
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @81
@@ -37107,22 +42159,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @18
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
       class S @40
+        reference: <thisLibrary>::<definingUnit>::@class::S
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @42
@@ -37130,20 +42189,24 @@
             defaultType: A
         constructors
           @59
+            reference: <thisLibrary>::<definingUnit>::@class::S::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::S
             parameters
               requiredPositional _ @63
                 type: T
     topLevelVariables
       static s @74
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::s
         enclosingElement: <thisLibrary>::<definingUnit>
         type: S<B>
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get s @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::s
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: S<B>
       synthetic static set s= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::s
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _s @-1
@@ -37168,82 +42231,104 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           b @14
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: B
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get b @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: B
           synthetic set b= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _b @-1
                 type: B
             returnType: void
       class B @25
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic c @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::c
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: C
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           get c @37
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::c
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: C
           set c= @59
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::c
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional value @63
                 type: C
             returnType: void
       class C @81
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       class D @92
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: C
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             superConstructor: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
     topLevelVariables
       static a @111
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: A
         shouldUseTypeForInitializerInference: false
       static x @128
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A
       synthetic static set a= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _a @-1
             type: A
         returnType: void
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -37261,44 +42346,55 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static x @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Iterable<String>
         shouldUseTypeForInitializerInference: false
       static y @40
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::y
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<int>
         shouldUseTypeForInitializerInference: false
       static z @53
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::z
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<String>
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Iterable<String>
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
             type: Iterable<String>
         returnType: void
       synthetic static get y @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::y
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<int>
       synthetic static set y= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::y
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _y @-1
             type: List<int>
         returnType: void
       synthetic static get z @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::z
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<String>
       synthetic static set z= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::z
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _z @-1
@@ -37317,23 +42413,30 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           p @16
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::p
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get p @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::p
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set p= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::p
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _p @-1
@@ -37341,27 +42444,33 @@
             returnType: void
     topLevelVariables
       static x @25
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<C>
         shouldUseTypeForInitializerInference: false
       static y @40
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::y
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Iterable<int>
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<C>
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
             type: List<C>
         returnType: void
       synthetic static get y @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::y
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Iterable<int>
       synthetic static set y= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::y
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _y @-1
@@ -37380,10 +42489,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @0
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant U @2
@@ -37405,10 +42517,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant U @8
@@ -37417,13 +42532,16 @@
             defaultType: dynamic
         fields
           final x @24
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           @29
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
 ''');
@@ -37439,10 +42557,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant U @8
@@ -37451,13 +42572,16 @@
             defaultType: dynamic
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           get x @22
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
 ''');
@@ -37476,19 +42600,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           f @15
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             typeParameters
               covariant U @17
@@ -37511,10 +42640,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant U @8
@@ -37523,13 +42655,16 @@
             defaultType: dynamic
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           set x= @27
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional value @29
@@ -37548,10 +42683,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @0
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @2
@@ -37570,10 +42708,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @0
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @2
@@ -37593,10 +42734,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant P @8
@@ -37604,24 +42748,29 @@
             defaultType: num
         constructors
           factory @35
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional p @49
                 type: Iterable<P>
           _ @66
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::_
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 65
             nameEnd: 67
     topLevelVariables
       static c @78
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C<dynamic>
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C<dynamic>
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
@@ -37641,32 +42790,41 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static final foo @25
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: false
           static final bar @56
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::bar
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int Function(double)
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic static get bar @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::bar
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int Function(double)
         methods
           static baz @100
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::baz
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int Function(double)
 ''');
@@ -37684,18 +42842,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static x @21
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -37703,6 +42866,7 @@
         returnType: void
     functions
       m @4
+        reference: <thisLibrary>::<definingUnit>::@function::m
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @6
@@ -37724,44 +42888,55 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static m @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::m
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int Function<T>()?
         shouldUseTypeForInitializerInference: true
       static n @53
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::n
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int Function<T>()
         shouldUseTypeForInitializerInference: true
       static x @73
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get m @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::m
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function<T>()?
       synthetic static set m= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::m
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _m @-1
             type: int Function<T>()?
         returnType: void
       synthetic static get n @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::n
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function<T>()
       synthetic static set n= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::n
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _n @-1
             type: int Function<T>()
         returnType: void
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -37782,24 +42957,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:collection
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:collection
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static m @30
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::m
         enclosingElement: <thisLibrary>::<definingUnit>
         type: HashMap<dynamic, dynamic>
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get m @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::m
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: HashMap<dynamic, dynamic>
       synthetic static set m= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::m
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _m @-1
@@ -37817,63 +42997,77 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static a @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [a, b, c]
         type: dynamic
         shouldUseTypeForInitializerInference: false
       static b @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [a, b, c]
         type: dynamic
         shouldUseTypeForInitializerInference: false
       static c @34
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [a, b, c]
         type: dynamic
         shouldUseTypeForInitializerInference: false
       static d @49
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::d
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set a= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _a @-1
             type: dynamic
         returnType: void
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set b= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _b @-1
             type: dynamic
         returnType: void
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
             type: dynamic
         returnType: void
       synthetic static get d @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::d
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set d= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::d
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _d @-1
@@ -37888,27 +43082,34 @@
         ' abstract class D { F get v; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @31
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: D
         fields
           v @49
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int Function(String)
               alias: <thisLibrary>::<definingUnit>::@typeAlias::F
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
         accessors
           synthetic get v @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int Function(String)
               alias: <thisLibrary>::<definingUnit>::@typeAlias::F
           synthetic set v= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _v @-1
@@ -37916,22 +43117,27 @@
                   alias: <thisLibrary>::<definingUnit>::@typeAlias::F
             returnType: void
       abstract class D @69
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic v @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             type: int Function(String)
               alias: <thisLibrary>::<definingUnit>::@typeAlias::F
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
         accessors
           abstract get v @79
+            reference: <thisLibrary>::<definingUnit>::@class::D::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             returnType: int Function(String)
               alias: <thisLibrary>::<definingUnit>::@typeAlias::F
     typeAliases
       functionTypeAliasBased F @12
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: int Function(String)
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -37949,24 +43155,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static x @21
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -37983,24 +43194,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static x @21
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int?
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int?
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -38017,24 +43233,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static x @21
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: void Function()
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: void Function()
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -38051,24 +43272,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static x @21
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: void Function()?
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: void Function()?
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -38088,10 +43314,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -38099,25 +43328,30 @@
         supertype: D<int, T>
         fields
           v @37
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: Map<T, int>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
               substitution: {U: int, V: T}
         accessors
           synthetic get v @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: Map<T, int>
           synthetic set v= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _v @-1
                 type: Map<T, int>
             returnType: void
       abstract class D @57
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant U @59
@@ -38126,13 +43360,16 @@
             defaultType: dynamic
         fields
           synthetic v @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             type: Map<V, U>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
         accessors
           abstract get v @83
+            reference: <thisLibrary>::<definingUnit>::@class::D::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             returnType: Map<V, U>
 ''');
@@ -38146,10 +43383,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @13
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: void Function(int Function(String))
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -38161,14 +43401,17 @@
           returnType: void
     topLevelVariables
       static v @53
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -38176,6 +43419,7 @@
         returnType: void
     functions
       h @33
+        reference: <thisLibrary>::<definingUnit>::@function::h
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional f @37
@@ -38195,10 +43439,13 @@
 }''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -38208,12 +43455,14 @@
         supertype: D<U, int>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
               substitution: {V: U, W: int}
         methods
           f @41
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional x @47
@@ -38222,6 +43471,7 @@
                 type: int Function(U)
             returnType: void
       abstract class D @73
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant V @75
@@ -38230,9 +43480,11 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
         methods
           abstract f @90
+            reference: <thisLibrary>::<definingUnit>::@class::D::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             parameters
               requiredPositional x @96
@@ -38264,24 +43516,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @23
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: D
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: package:test/a.dart::<definingUnit>::@class::D::@constructor::new
         methods
           f @44
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional x @50
@@ -38297,18 +43554,23 @@
         ' abstract class D { void f(int x, int g(String s)); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: D
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
         methods
           f @25
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional x @31
@@ -38317,12 +43579,15 @@
                 type: int Function(String)
             returnType: void
       abstract class D @57
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
         methods
           abstract f @66
+            reference: <thisLibrary>::<definingUnit>::@class::D::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             parameters
               requiredPositional x @72
@@ -38343,18 +43608,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static v @40
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -38362,6 +43632,7 @@
         returnType: void
     functions
       f @0
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional g @7
@@ -38382,18 +43653,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static v @42
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -38401,9 +43677,11 @@
         returnType: void
     functions
       f @0
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           optionalNamed default g @8
+            reference: <thisLibrary>::<definingUnit>::@function::f::@parameter::g
             type: void Function(int, void Function())
             parameters
               requiredPositional x @14
@@ -38419,38 +43697,48 @@
         ' abstract class D { void set f(int g(String s)); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: D
         fields
           synthetic f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int Function(String)
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
         accessors
           set f= @29
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional g @31
                 type: int Function(String)
             returnType: void
       abstract class D @54
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             type: int Function(String)
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
         accessors
           abstract set f= @67
+            reference: <thisLibrary>::<definingUnit>::@class::D::@setter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             parameters
               requiredPositional g @73
@@ -38477,24 +43765,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class B @23
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: package:test/a.dart::<definingUnit>::@class::A::@constructor::new
         methods
           m @39
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional p @41
@@ -38521,41 +43814,52 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
           named @21
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 20
             nameEnd: 26
     topLevelVariables
       static a1 @36
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a1
         enclosingElement: <thisLibrary>::<definingUnit>
         type: A
         shouldUseTypeForInitializerInference: false
       static a2 @50
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a2
         enclosingElement: <thisLibrary>::<definingUnit>
         type: A
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a1 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a1
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A
       synthetic static set a1= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::a1
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _a1 @-1
             type: A
         returnType: void
       synthetic static get a2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A
       synthetic static set a2= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::a2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _a2 @-1
@@ -38578,40 +43882,49 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo.dart as foo @21
       enclosingElement: <thisLibrary>
   prefixes
     foo @21
+      reference: <thisLibrary>::@prefix::foo
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo.dart as foo @21
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static a1 @30
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a1
         enclosingElement: <thisLibrary>::<definingUnit>
         type: A
         shouldUseTypeForInitializerInference: false
       static a2 @48
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a2
         enclosingElement: <thisLibrary>::<definingUnit>
         type: A
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a1 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a1
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A
       synthetic static set a1= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::a1
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _a1 @-1
             type: A
         returnType: void
       synthetic static get a2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A
       synthetic static set a2= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::a2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _a2 @-1
@@ -38630,18 +43943,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static v @71
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<Object Function(int Function(String))>
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<Object Function(int Function(String))>
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -38649,6 +43967,7 @@
         returnType: void
     functions
       f @4
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional x @10
@@ -38658,6 +43977,7 @@
                 type: String
         returnType: int
       g @39
+        reference: <thisLibrary>::<definingUnit>::@function::g
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional x @45
@@ -38687,51 +44007,66 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           abstract m @25
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
       abstract class B @48
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         methods
           abstract m @61
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: String
       abstract class C @84
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
           B
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       abstract class D @121
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: C
         fields
           f @141
+            reference: <thisLibrary>::<definingUnit>::@class::D::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             superConstructor: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             returnType: dynamic
           synthetic set f= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@setter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             parameters
               requiredPositional _f @-1
@@ -38744,18 +44079,23 @@
     var library = await buildLibrary('var v = () => 0;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static v @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int Function()
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function()
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -38768,18 +44108,23 @@
     var library = await buildLibrary('var v = (f) async => await f;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static v @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Future<dynamic> Function(dynamic)
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Future<dynamic> Function(dynamic)
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -38796,24 +44141,29 @@
     // The analyzer type system over-flattens - see dartbug.com/31887
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static v @25
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Future<int> Function(Future<Future<Future<int>>>)
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Future<int> Function(Future<Future<Future<int>>>)
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -38829,24 +44179,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static v @25
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Future<int> Function(Future<int>)
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Future<int> Function(Future<int>)
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -38862,24 +44217,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static v @25
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Future<dynamic> Function(Future<dynamic>)
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Future<dynamic> Function(Future<dynamic>)
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -38896,24 +44256,31 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           v @16
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int Function()
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get v @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int Function()
           synthetic set v= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _v @-1
@@ -38931,10 +44298,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: void
 ''');
@@ -38966,52 +44336,63 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/nullSafe.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/nullSafe.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class X1 @30
+        reference: <thisLibrary>::<definingUnit>::@class::X1
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: NullSafeDefault
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X1
             superConstructor: package:test/nullSafe.dart::<definingUnit>::@class::NullSafeDefault::@constructor::new
         methods
           == @74
+            reference: <thisLibrary>::<definingUnit>::@class::X1::@method::==
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X1
             parameters
               requiredPositional other @77
                 type: Object
             returnType: bool
       class X2 @102
+        reference: <thisLibrary>::<definingUnit>::@class::X2
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: NullSafeObject
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X2::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X2
             superConstructor: package:test/nullSafe.dart::<definingUnit>::@class::NullSafeObject::@constructor::new
         methods
           == @145
+            reference: <thisLibrary>::<definingUnit>::@class::X2::@method::==
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X2
             parameters
               requiredPositional other @148
                 type: Object
             returnType: bool
       class X3 @173
+        reference: <thisLibrary>::<definingUnit>::@class::X3
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: NullSafeInt
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X3::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X3
             superConstructor: package:test/nullSafe.dart::<definingUnit>::@class::NullSafeInt::@constructor::new
         methods
           == @213
+            reference: <thisLibrary>::<definingUnit>::@class::X3::@method::==
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X3
             parameters
               requiredPositional other @216
@@ -39027,10 +44408,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant S @8
@@ -39041,16 +44425,20 @@
             defaultType: C<num, dynamic>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     topLevelVariables
       static c @47
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C<num, C<num, dynamic>>
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C<num, C<num, dynamic>>
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
@@ -39070,10 +44458,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -39081,22 +44472,28 @@
             defaultType: C<dynamic>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       class B @56
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           c3 @66
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::c3
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: C<C<Object?>>
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           synthetic get c3 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::c3
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: C<C<Object?>>
           synthetic set c3= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::c3
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _c3 @-1
@@ -39104,26 +44501,32 @@
             returnType: void
     topLevelVariables
       static c @29
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C<C<dynamic>>
       static c2 @36
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c2
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C<C<Object?>>
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C<C<dynamic>>
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
             type: C<C<dynamic>>
         returnType: void
       synthetic static get c2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C<C<Object?>>
       synthetic static set c2= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c2 @-1
@@ -39139,10 +44542,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -39153,16 +44559,20 @@
             defaultType: num
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     topLevelVariables
       static c @47
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C<C<dynamic, num>, num>
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C<C<dynamic, num>, num>
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
@@ -39187,22 +44597,27 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/b.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/b.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @23
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           f @31
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: O Function(O)
               alias: package:test/a.dart::<definingUnit>::@typeAlias::F
@@ -39218,10 +44633,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           contravariant T @10
             bound: num
@@ -39234,6 +44652,7 @@
           returnType: dynamic
     topLevelVariables
       static f @33
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic Function(num)
           alias: <thisLibrary>::<definingUnit>::@typeAlias::F
@@ -39241,12 +44660,14 @@
               num
     accessors
       synthetic static get f @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic Function(num)
           alias: <thisLibrary>::<definingUnit>::@typeAlias::F
             typeArguments
               num
       synthetic static set f= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _f @-1
@@ -39266,18 +44687,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       notSimplyBounded class B @20
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @22
@@ -39288,16 +44714,20 @@
             defaultType: A<int Function()>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
     topLevelVariables
       static b @69
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: B<int Function(), A<int Function()>>
     accessors
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: B<int Function(), A<int Function()>>
       synthetic static set b= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _b @-1
@@ -39313,10 +44743,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           contravariant T @10
             bound: num
@@ -39331,6 +44764,7 @@
           returnType: S
     topLevelVariables
       static f @49
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: S Function<S>(num)
           alias: <thisLibrary>::<definingUnit>::@typeAlias::F
@@ -39338,12 +44772,14 @@
               num
     accessors
       synthetic static get f @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: S Function<S>(num)
           alias: <thisLibrary>::<definingUnit>::@typeAlias::F
             typeArguments
               num
       synthetic static set f= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _f @-1
@@ -39364,10 +44800,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant R @8
@@ -39375,17 +44814,21 @@
             defaultType: B<num>
         fields
           final values @31
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: List<B<num>>
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get values @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: List<B<num>>
       class B @55
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @57
@@ -39393,6 +44836,7 @@
             defaultType: num
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
 ''');
   }
@@ -39404,10 +44848,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -39415,16 +44862,20 @@
             defaultType: num
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     topLevelVariables
       static c @28
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C<num>
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C<num>
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
@@ -39446,19 +44897,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart as a @19
       enclosingElement: <thisLibrary>
   prefixes
     a @19
+      reference: <thisLibrary>::@prefix::a
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart as a @19
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @39
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -39483,6 +44938,7 @@
             element: package:test/a.dart::<definingUnit>::@class::A::@constructor::named
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -39500,16 +44956,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @32
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -39529,6 +44988,7 @@
             element: package:test/a.dart::<definingUnit>::@class::A::@constructor::named
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -39542,32 +45002,40 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async as ppp @23
       enclosingElement: <thisLibrary>
   prefixes
     ppp @23
+      reference: <thisLibrary>::@prefix::ppp
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async as ppp @23
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @34
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           v @50
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: List<dynamic>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get v @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: List<dynamic>
           synthetic set v= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _v @-1
@@ -39586,12 +45054,14 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
     package:test/b.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
@@ -39600,6 +45070,7 @@
         enclosingElement: <thisLibrary>::<definingUnit>
     functions
       foo @34
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           optionalPositional default p @39
@@ -39626,16 +45097,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/c.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/c.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     functions
       foo @17
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           optionalPositional default p @22
@@ -39657,17 +45131,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static V @27
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set V= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _V @-1
@@ -39675,6 +45154,7 @@
         returnType: void
     functions
       foo @0
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           optionalPositional default p @5
@@ -39686,6 +45166,7 @@
                 staticType: dynamic
         returnType: dynamic
       V @16
+        reference: <thisLibrary>::<definingUnit>::@function::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -39700,32 +45181,41 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           foo @16
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
           synthetic bar @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::bar
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _foo @-1
                 type: int
             returnType: void
           set bar= @32
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::bar
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional final this.foo @41
@@ -39743,20 +45233,26 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           set x= @16
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional final this.x @23
@@ -39770,7 +45266,9 @@
     var library = await buildLibrary('');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
 ''');
   }
@@ -39786,23 +45284,31 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class B @31
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           class A @35
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::A::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::A
 ''');
 
@@ -39833,7 +45339,9 @@
     configuration.withLibraryAugmentations = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentations
     <thisLibrary>::@augmentation::package:test/a.dart
@@ -39841,14 +45349,20 @@
     <thisLibrary>::@augmentation::package:test/c.dart
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
       augmentationImports
         package:test/b.dart
+          reference: <thisLibrary>::@augmentation::package:test/b.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/b.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
     package:test/c.dart
+      reference: <thisLibrary>::@augmentation::package:test/c.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/c.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/c.dart
 ''');
 
@@ -39863,7 +45377,9 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     noRelativeUriString
@@ -39876,7 +45392,9 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     source 'package:test/test.dart'
@@ -39889,7 +45407,9 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     relativeUri 'foo:bar'
@@ -39905,7 +45425,9 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     source 'package:test/a.dart'
@@ -39921,7 +45443,9 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     source 'package:test/a.dart'
@@ -39934,7 +45458,9 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     source 'package:test/a.dart'
@@ -39947,7 +45473,9 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     relativeUriString ':'
@@ -39964,8 +45492,10 @@
 library
   name: test
   nameOffset: 24
+  reference: <thisLibrary>
   documentationComment: /// aaa\n/// bbb
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
 ''');
   }
@@ -39981,8 +45511,10 @@
 library
   name: test
   nameOffset: 30
+  reference: <thisLibrary>
   documentationComment: /**\n * aaa\n * bbb\n */
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
 ''');
   }
@@ -39993,10 +45525,12 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     noRelativeUriString
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       noRelativeUriString
@@ -40010,10 +45544,12 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/test.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/test.dart
@@ -40027,10 +45563,12 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     relativeUri 'foo:bar'
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       relativeUri 'foo:bar'
@@ -40044,10 +45582,12 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -40064,10 +45604,12 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     source 'package:test/a.dart'
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       source 'package:test/a.dart'
@@ -40084,10 +45626,12 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     source 'package:test/a.dart'
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       source 'package:test/a.dart'
@@ -40101,10 +45645,12 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     relativeUriString ':'
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       relativeUriString ':'
@@ -40118,10 +45664,12 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     noRelativeUriString
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       noRelativeUriString
@@ -40146,10 +45694,12 @@
     configuration.withSyntheticDartCoreImport = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:core synthetic
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:core synthetic
@@ -40163,10 +45713,12 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/test.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/test.dart
@@ -40180,10 +45732,12 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     relativeUri 'foo:bar'
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       relativeUri 'foo:bar'
@@ -40197,10 +45751,12 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
@@ -40217,10 +45773,12 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     source 'package:test/a.dart'
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       source 'package:test/a.dart'
@@ -40237,10 +45795,12 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     source 'package:test/a.dart'
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       source 'package:test/a.dart'
@@ -40254,10 +45814,12 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     relativeUriString ':'
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       relativeUriString ':'
@@ -40271,7 +45833,9 @@
 library
   name: foo.bar
   nameOffset: 8
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
 ''');
   }
@@ -40282,7 +45846,9 @@
 library
   name: foo.bar
   nameOffset: 8
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
 ''');
   }
@@ -40296,12 +45862,16 @@
 library
   name: my.lib
   nameOffset: 8
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   parts
     package:test/a.dart
+      reference: <thisLibrary>::@unit::package:test/a.dart
       enclosingElement: <thisLibrary>
     package:test/b.dart
+      reference: <thisLibrary>::@unit::package:test/b.dart
       enclosingElement: <thisLibrary>
 ''');
   }
@@ -40312,7 +45882,9 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   parts
     noRelativeUriString
@@ -40333,22 +45905,29 @@
 library
   name: my.lib
   nameOffset: 8
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @37
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
   parts
     package:test/a.dart
+      reference: <thisLibrary>::@unit::package:test/a.dart
       enclosingElement: <thisLibrary>
       classes
         class B @22
+          reference: <thisLibrary>::@unit::package:test/a.dart::@class::B
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           constructors
             synthetic @-1
+              reference: <thisLibrary>::@unit::package:test/a.dart::@class::B::@constructor::new
               enclosingElement: <thisLibrary>::@unit::package:test/a.dart::@class::B
 ''');
   }
@@ -40364,22 +45943,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @21
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
   parts
     package:test/a.dart
+      reference: <thisLibrary>::@unit::package:test/a.dart
       enclosingElement: <thisLibrary>
       classes
         class B @27
+          reference: <thisLibrary>::@unit::package:test/a.dart::@class::B
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           constructors
             synthetic @-1
+              reference: <thisLibrary>::@unit::package:test/a.dart::@class::B::@constructor::new
               enclosingElement: <thisLibrary>::@unit::package:test/a.dart::@class::B
 ''');
   }
@@ -40390,7 +45976,9 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   parts
     relativeUri 'foo:bar'
@@ -40403,7 +45991,9 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   parts
     source 'package:test/test.dart'
@@ -40417,7 +46007,9 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   parts
     source 'package:test/a.dart'
@@ -40430,7 +46022,9 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   parts
     source 'package:test/a.dart'
@@ -40443,7 +46037,9 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   parts
     relativeUriString ':'
@@ -40471,10 +46067,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @0
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -40490,13 +46089,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -40511,16 +46114,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           m @12
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
 ''');
@@ -40534,14 +46142,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static g @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::g
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
     accessors
       static get g @4
+        reference: <thisLibrary>::<definingUnit>::@getter::g
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -40561,13 +46173,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -40586,16 +46202,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           m @12
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
 ''');
@@ -40613,10 +46234,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       main @0
+        reference: <thisLibrary>::<definingUnit>::@function::main
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -40626,13 +46250,17 @@
     var library = await buildLibrary('class main {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class main @6
+        reference: <thisLibrary>::<definingUnit>::@class::main
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::main::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::main
 ''');
   }
@@ -40642,16 +46270,20 @@
         await buildLibrary('class main = C with D; class C {} class D {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class alias main @6
+        reference: <thisLibrary>::<definingUnit>::@class::main
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: C
         mixins
           D
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::main::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::main
             constantInitializers
               SuperConstructorInvocation
@@ -40662,14 +46294,18 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             superConstructor: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
       class C @29
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       class D @40
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
 ''');
   }
@@ -40680,10 +46316,12 @@
     var library = await buildLibrary('export "a.dart";');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -40696,10 +46334,12 @@
     var library = await buildLibrary('export "a.dart";');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -40711,14 +46351,18 @@
     var library = await buildLibrary('get main => null;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static main @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::main
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
     accessors
       static get main @4
+        reference: <thisLibrary>::<definingUnit>::@getter::main
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -40729,10 +46373,12 @@
     var library = await buildLibrary('export "a.dart";');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -40744,10 +46390,13 @@
     var library = await buildLibrary('typedef main();');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased main @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::main
         aliasedType: dynamic Function()
         aliasedElement: GenericFunctionTypeElement
           returnType: dynamic
@@ -40759,10 +46408,12 @@
     var library = await buildLibrary('export "a.dart";');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -40774,17 +46425,22 @@
     var library = await buildLibrary('var main;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static main @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::main
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
     accessors
       synthetic static get main @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::main
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set main= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::main
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _main @-1
@@ -40798,10 +46454,12 @@
     var library = await buildLibrary('export "a.dart";');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/a.dart
@@ -40820,14 +46478,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           class A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             metadata
               Annotation
@@ -40839,6 +46502,7 @@
                 element: dart:core::<definingUnit>::@getter::deprecated
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::A::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::A
 ''');
   }
@@ -40853,10 +46517,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       metadata
         Annotation
           atSign: @ @0
@@ -40866,6 +46533,7 @@
             staticType: null
           element: dart:core::<definingUnit>::@getter::deprecated
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
 ''');
   }
@@ -40881,10 +46549,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       exports
         dart:math
           enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
@@ -40897,6 +46568,7 @@
                 staticType: null
               element: dart:core::<definingUnit>::@getter::deprecated
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         libraryExports
           dart:math
@@ -40918,11 +46590,15 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       augmentationImports
         package:test/a.dart
@@ -40934,7 +46610,9 @@
                 staticElement: dart:core::<definingUnit>::@getter::deprecated
                 staticType: null
               element: dart:core::<definingUnit>::@getter::deprecated
+          reference: <thisLibrary>::@augmentation::package:test/a.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/a.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
 ''');
   }
@@ -40950,10 +46628,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       imports
         dart:math
           enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
@@ -40966,6 +46647,7 @@
                 staticType: null
               element: dart:core::<definingUnit>::@getter::deprecated
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         libraryImports
           dart:math
@@ -40983,10 +46665,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       metadata
         Annotation
           atSign: @ @0
@@ -40996,6 +46681,7 @@
             staticType: null
           element: dart:core::<definingUnit>::@getter::deprecated
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
 ''');
   }
@@ -41015,13 +46701,17 @@
     // Check details.
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @19
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @34
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             metadata
               Annotation
@@ -41035,12 +46725,15 @@
             shouldUseTypeForInitializerInference: true
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -41048,6 +46741,7 @@
             returnType: void
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -41057,6 +46751,7 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -41075,10 +46770,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @27
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -41101,6 +46799,7 @@
                 element: <thisLibrary>::<definingUnit>::@getter::foo
         fields
           static const foo @54
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: false
@@ -41110,13 +46809,16 @@
                 staticType: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
         methods
           bar @77
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::bar
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             metadata
               Annotation
@@ -41129,6 +46831,7 @@
             returnType: void
     topLevelVariables
       static const foo @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -41138,6 +46841,7 @@
             staticType: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -41152,10 +46856,13 @@
 class C {}''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @44
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -41174,9 +46881,11 @@
             element: <thisLibrary>::<definingUnit>::@getter::b
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -41185,6 +46894,7 @@
             literal: null @10
             staticType: Null
       static const b @22
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -41194,9 +46904,11 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -41207,10 +46919,13 @@
         'const a = null; @a class C = D with E; class D {} class E {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class alias C @25
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -41225,6 +46940,7 @@
           E
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -41235,17 +46951,22 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             superConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
       class D @45
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
       class E @56
+        reference: <thisLibrary>::<definingUnit>::@class::E
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -41255,6 +46976,7 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -41270,13 +46992,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const named @20
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 19
             nameEnd: 25
@@ -41284,6 +47010,7 @@
               requiredPositional _ @30
                 type: int
       class C @54
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -41310,6 +47037,7 @@
             element: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -41325,16 +47053,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const named @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 22
             nameEnd: 28
@@ -41342,6 +47074,7 @@
               requiredPositional _ @31
                 type: T
       class C @56
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -41374,6 +47107,7 @@
               substitution: {T: int}
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -41389,20 +47123,25 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const named @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 22
             nameEnd: 28
       class C @57
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -41434,6 +47173,7 @@
               substitution: {T: int}
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -41449,20 +47189,25 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const named @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 22
             nameEnd: 28
       class C @57
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -41494,6 +47239,7 @@
               substitution: {T: int}
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -41511,19 +47257,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo.dart as foo @21
       enclosingElement: <thisLibrary>
   prefixes
     foo @21
+      reference: <thisLibrary>::@prefix::foo
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo.dart as foo @21
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @48
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -41555,6 +47305,7 @@
             element: package:test/foo.dart::<definingUnit>::@class::A::@constructor::named
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -41572,19 +47323,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo.dart as foo @21
       enclosingElement: <thisLibrary>
   prefixes
     foo @21
+      reference: <thisLibrary>::@prefix::foo
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo.dart as foo @21
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @48
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -41620,6 +47375,7 @@
               substitution: {T: int}
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -41637,19 +47393,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo.dart as foo @21
       enclosingElement: <thisLibrary>
   prefixes
     foo @21
+      reference: <thisLibrary>::@prefix::foo
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo.dart as foo @21
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @52
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -41689,6 +47449,7 @@
               substitution: {T: int}
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -41708,17 +47469,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const named @20
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 19
             nameEnd: 25
       class alias C @50
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @52
@@ -41728,6 +47494,7 @@
           B
         constructors
           synthetic const named @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -41743,6 +47510,7 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
       class D @85
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -41771,9 +47539,11 @@
               substitution: {T: dynamic}
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
     mixins
       mixin B @38
+        reference: <thisLibrary>::<definingUnit>::@mixin::B
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -41790,18 +47560,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @18
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _ @24
                 type: int
       class C @42
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -41820,6 +47595,7 @@
             element: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -41835,21 +47611,26 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const @21
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _ @25
                 type: T
       class C @44
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -41870,6 +47651,7 @@
               substitution: {T: int}
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -41885,18 +47667,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const @21
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class C @45
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -41921,6 +47708,7 @@
               substitution: {T: int}
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -41931,19 +47719,23 @@
         await buildLibrary('import "foo.dart" as foo; @foo.A(0) class C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo.dart as foo @21
       enclosingElement: <thisLibrary>
   prefixes
     foo @21
+      reference: <thisLibrary>::@prefix::foo
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo.dart as foo @21
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @42
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -41970,6 +47762,7 @@
             element: package:test/foo.dart::<definingUnit>::@class::A::@constructor::new
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -41987,19 +47780,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo.dart as foo @21
       enclosingElement: <thisLibrary>
   prefixes
     foo @21
+      reference: <thisLibrary>::@prefix::foo
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo.dart as foo @21
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @42
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -42028,6 +47825,7 @@
               substitution: {T: int}
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -42045,19 +47843,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo.dart as foo @21
       enclosingElement: <thisLibrary>
   prefixes
     foo @21
+      reference: <thisLibrary>::@prefix::foo
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo.dart as foo @21
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @46
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -42090,6 +47892,7 @@
               substitution: {T: int}
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -42109,15 +47912,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @18
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class alias C @44
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @46
@@ -42127,6 +47935,7 @@
           B
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -42137,6 +47946,7 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
       class D @73
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -42153,9 +47963,11 @@
               substitution: {T: dynamic}
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
     mixins
       mixin B @32
+        reference: <thisLibrary>::<definingUnit>::@mixin::B
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -42167,18 +47979,23 @@
         await buildLibrary('class A { const A(x); } @A(null) class C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @16
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional x @18
                 type: dynamic
       class C @39
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -42197,6 +48014,7 @@
             element: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -42206,13 +48024,17 @@
         await buildLibrary('const a = null; class C { @a C.named(); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @22
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           named @31
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             metadata
               Annotation
@@ -42226,6 +48048,7 @@
             nameEnd: 36
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -42235,6 +48058,7 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -42244,13 +48068,17 @@
     var library = await buildLibrary('const a = null; class C { @a C(); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @22
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @29
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             metadata
               Annotation
@@ -42262,6 +48090,7 @@
                 element: <thisLibrary>::<definingUnit>::@getter::a
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -42271,6 +48100,7 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -42280,14 +48110,18 @@
     var library = await buildLibrary('const a = 42; enum E { @a v }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @19
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @26
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             metadata
               Annotation
@@ -42312,6 +48146,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -42326,16 +48161,20 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -42345,6 +48184,7 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -42365,17 +48205,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final value @26
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::value
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: dynamic
         constructors
           const @41
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional final this.value @48
@@ -42383,14 +48228,17 @@
                 field: <thisLibrary>::<definingUnit>::@class::A::@field::value
         accessors
           synthetic get value @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::value
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: dynamic
     enums
       enum E @64
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant a @78
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             metadata
               Annotation
@@ -42422,6 +48270,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           static const enumConstant b @83
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::b
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -42438,6 +48287,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           static const enumConstant c @96
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::c
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             metadata
               Annotation
@@ -42469,6 +48319,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -42491,18 +48342,23 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get a @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get b @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get c @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::c
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
 ''');
@@ -42517,14 +48373,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @16
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             metadata
               Annotation
@@ -42549,6 +48409,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -42563,12 +48424,15 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
 ''');
@@ -42585,14 +48449,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @19
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @25
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -42609,6 +48477,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -42623,6 +48492,7 @@
                 staticType: List<E>
         constructors
           const @41
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             metadata
               Annotation
@@ -42634,13 +48504,16 @@
                 element: <thisLibrary>::<definingUnit>::@getter::a
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -42650,6 +48523,7 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -42666,14 +48540,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @19
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @25
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -42690,6 +48568,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -42704,16 +48583,20 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
         methods
           foo @40
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             metadata
               Annotation
@@ -42726,6 +48609,7 @@
             returnType: void
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -42735,6 +48619,7 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -42754,10 +48639,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @26
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -42781,6 +48669,7 @@
         supertype: Enum
         fields
           static const enumConstant v @40
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E<dynamic>
             shouldUseTypeForInitializerInference: false
@@ -42799,6 +48688,7 @@
                   rightParenthesis: ) @0
                 staticType: E<dynamic>
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E<dynamic>>
             constantInitializer
@@ -42812,6 +48702,7 @@
                 rightBracket: ] @0
                 staticType: List<E<dynamic>>
           static const foo @58
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: int
             shouldUseTypeForInitializerInference: false
@@ -42821,19 +48712,24 @@
                 staticType: int
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E<dynamic>
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E<dynamic>>
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: int
         methods
           bar @81
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@method::bar
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             metadata
               Annotation
@@ -42846,6 +48742,7 @@
             returnType: void
     topLevelVariables
       static const foo @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -42855,6 +48752,7 @@
             staticType: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -42869,10 +48767,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @19
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @24
@@ -42888,6 +48789,7 @@
         supertype: Enum
         fields
           static const enumConstant v @31
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E<dynamic>
             shouldUseTypeForInitializerInference: false
@@ -42906,6 +48808,7 @@
                   rightParenthesis: ) @0
                 staticType: E<dynamic>
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E<dynamic>>
             constantInitializer
@@ -42920,16 +48823,20 @@
                 staticType: List<E<dynamic>>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E<dynamic>
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E<dynamic>>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -42939,6 +48846,7 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -42948,10 +48856,13 @@
     var library = await buildLibrary('const a = 42; @a enum E { v }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @22
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -42964,6 +48875,7 @@
         supertype: Enum
         fields
           static const enumConstant v @26
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -42980,6 +48892,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -42994,16 +48907,20 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -43013,6 +48930,7 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -43023,6 +48941,7 @@
     var library = await buildLibrary('@a export "foo.dart"; const a = null;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   metadata
     Annotation
       atSign: @ @0
@@ -43043,12 +48962,14 @@
             staticType: null
           element: <thisLibrary>::<definingUnit>::@getter::a
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/foo.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const a @28
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -43058,6 +48979,7 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -43076,10 +48998,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       E @31
+        reference: <thisLibrary>::<definingUnit>::@extension::E
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -43103,6 +49028,7 @@
         extendedType: int
         fields
           static const foo @65
+            reference: <thisLibrary>::<definingUnit>::@extension::E::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::E
             type: int
             shouldUseTypeForInitializerInference: false
@@ -43112,10 +49038,12 @@
                 staticType: int
         accessors
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::E::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::E
             returnType: int
         methods
           bar @88
+            reference: <thisLibrary>::<definingUnit>::@extension::E::@method::bar
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::E
             metadata
               Annotation
@@ -43128,6 +49056,7 @@
             returnType: void
     topLevelVariables
       static const foo @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -43137,6 +49066,7 @@
             staticType: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -43151,16 +49081,21 @@
 extension E on A {}''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @22
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     extensions
       E @50
+        reference: <thisLibrary>::<definingUnit>::@extension::E
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -43183,6 +49118,7 @@
         extendedType: A
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -43192,6 +49128,7 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -43201,13 +49138,17 @@
     var library = await buildLibrary('const a = null; class C { @a int x; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @22
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @33
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             metadata
               Annotation
@@ -43220,12 +49161,15 @@
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -43233,6 +49177,7 @@
             returnType: void
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -43242,6 +49187,7 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -43257,17 +49203,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @22
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @32
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           @37
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional final this.x @47
@@ -43283,9 +49234,11 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -43293,6 +49246,7 @@
             returnType: void
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -43302,6 +49256,7 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -43312,17 +49267,22 @@
         'const a = null; class C { var x; C([@a this.x = null]); }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @22
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @30
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           @33
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               optionalPositional default final this.x @44
@@ -43342,9 +49302,11 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -43352,6 +49314,7 @@
             returnType: void
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -43361,6 +49324,7 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -43374,10 +49338,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -43387,10 +49354,12 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
     functions
       f @19
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -43408,10 +49377,13 @@
     var library = await buildLibrary('const a = null; @a get f => null;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -43420,13 +49392,16 @@
             literal: null @10
             staticType: Null
       synthetic static f @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       static get f @23
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -43444,10 +49419,13 @@
     var library = await buildLibrary('const a = null; @a set f(value) {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -43456,13 +49434,16 @@
             literal: null @10
             staticType: Null
       synthetic static f @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       static set f= @23
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -43483,10 +49464,13 @@
     var library = await buildLibrary('const a = null; @a typedef F();');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @27
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         metadata
           Annotation
             atSign: @ @16
@@ -43500,6 +49484,7 @@
           returnType: dynamic
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -43509,6 +49494,7 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -43518,10 +49504,13 @@
     var library = await buildLibrary('const a = null; f(@a g()) {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -43531,10 +49520,12 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
     functions
       f @16
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional g @21
@@ -43555,10 +49546,13 @@
     var library = await buildLibrary('const a = null; f([@a g() = null]) {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -43568,10 +49562,12 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
     functions
       f @16
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           optionalPositional default g @22
@@ -43601,10 +49597,13 @@
 typedef F = void Function();''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       F @46
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         metadata
           Annotation
             atSign: @ @32
@@ -43625,6 +49624,7 @@
           returnType: void
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -43633,6 +49633,7 @@
             literal: null @10
             staticType: Null
       static const b @22
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -43642,9 +49643,11 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -43658,6 +49661,7 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   metadata
     Annotation
       atSign: @ @0
@@ -43678,12 +49682,14 @@
             staticType: null
           element: <thisLibrary>::<definingUnit>::@getter::a
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:math
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static const a @29
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -43693,6 +49699,7 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -43707,6 +49714,7 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   metadata
     Annotation
       atSign: @ @0
@@ -43729,6 +49737,7 @@
       combinators
         show: Random
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:math
@@ -43737,6 +49746,7 @@
           show: Random
     topLevelVariables
       static const a @42
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -43746,6 +49756,7 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -43758,10 +49769,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       F @22
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: void Function(int)
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -43778,6 +49792,7 @@
           returnType: void
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -43787,6 +49802,7 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -43799,10 +49815,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       F @22
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: void Function(int Function(int))
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -43822,6 +49841,7 @@
           returnType: void
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -43831,6 +49851,7 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -43843,10 +49864,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       F @22
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: void Function<T>(int)
         aliasedElement: GenericFunctionTypeElement
           typeParameters
@@ -43865,6 +49889,7 @@
           returnType: void
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -43874,6 +49899,7 @@
             staticType: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -43883,10 +49909,13 @@
     var library = await buildLibrary('f(_) {} @f(42) class C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @21
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -43905,9 +49934,11 @@
             element: <thisLibrary>::<definingUnit>::@function::f
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     functions
       f @0
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _ @2
@@ -43926,7 +49957,9 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/a.dart
@@ -43938,7 +49971,9 @@
             staticElement: dart:core::<definingUnit>::@getter::deprecated
             staticType: null
           element: dart:core::<definingUnit>::@getter::deprecated
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
 ''');
   }
@@ -43951,7 +49986,9 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     source 'dart:math'
@@ -43972,6 +50009,7 @@
 library
   name: L
   nameOffset: 11
+  reference: <thisLibrary>
   metadata
     Annotation
       atSign: @ @0
@@ -43981,9 +50019,11 @@
         staticType: null
       element: <thisLibrary>::<definingUnit>::@getter::a
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @20
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -43993,6 +50033,7 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -44003,20 +50044,26 @@
         await buildLibrary('const a = null; class C { @a get m => null; }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @22
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic m @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           get m @33
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             metadata
               Annotation
@@ -44029,6 +50076,7 @@
             returnType: dynamic
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -44038,6 +50086,7 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -44055,16 +50104,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @38
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           m @54
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             metadata
               Annotation
@@ -44084,6 +50138,7 @@
             returnType: dynamic
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -44092,6 +50147,7 @@
             literal: null @10
             staticType: Null
       static const b @22
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -44101,9 +50157,11 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -44121,15 +50179,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin M @38
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
         methods
           m @54
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             metadata
               Annotation
@@ -44149,6 +50211,7 @@
             returnType: dynamic
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -44157,6 +50220,7 @@
             literal: null @10
             staticType: Null
       static const b @22
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -44166,9 +50230,11 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -44184,20 +50250,26 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @22
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic m @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           set m= @37
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             metadata
               Annotation
@@ -44213,6 +50285,7 @@
             returnType: void
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -44222,6 +50295,7 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -44240,10 +50314,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin M @27
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -44268,6 +50345,7 @@
           Object
         fields
           static const foo @54
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             type: int
             shouldUseTypeForInitializerInference: false
@@ -44277,10 +50355,12 @@
                 staticType: int
         accessors
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             returnType: int
         methods
           bar @77
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@method::bar
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             metadata
               Annotation
@@ -44293,6 +50373,7 @@
             returnType: void
     topLevelVariables
       static const foo @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -44302,6 +50383,7 @@
             staticType: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -44316,10 +50398,13 @@
 mixin M {}''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin M @44
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -44340,6 +50425,7 @@
           Object
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -44348,6 +50434,7 @@
             literal: null @10
             staticType: Null
       static const b @22
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -44357,9 +50444,11 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -44374,10 +50463,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @27
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -44400,9 +50492,11 @@
                 element: <thisLibrary>::<definingUnit>::@getter::foo
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     topLevelVariables
       static const foo @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -44412,6 +50506,7 @@
             staticType: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -44428,13 +50523,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @22
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @35
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             metadata
               Annotation
@@ -44457,6 +50556,7 @@
                     element: <thisLibrary>::<definingUnit>::@getter::foo
     topLevelVariables
       static const foo @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -44466,6 +50566,7 @@
             staticType: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -44482,20 +50583,26 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @22
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic getter @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::getter
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           get getter @43
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::getter
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             metadata
               Annotation
@@ -44508,6 +50615,7 @@
             returnType: int
     topLevelVariables
       static const foo @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -44517,6 +50625,7 @@
             staticType: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -44533,16 +50642,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @22
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           method @40
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::method
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             metadata
               Annotation
@@ -44577,6 +50691,7 @@
             returnType: void
     topLevelVariables
       static const foo @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -44586,6 +50701,7 @@
             staticType: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -44602,20 +50718,26 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @22
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic setter @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::setter
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           set setter= @39
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::setter
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             metadata
               Annotation
@@ -44639,6 +50761,7 @@
             returnType: void
     topLevelVariables
       static const foo @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -44648,6 +50771,7 @@
             staticType: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -44665,15 +50789,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @22
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class alias B @50
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -44699,6 +50828,7 @@
           M
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             constantInitializers
               SuperConstructorInvocation
@@ -44710,11 +50840,13 @@
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
     mixins
       mixin M @33
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
     topLevelVariables
       static const foo @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -44724,6 +50856,7 @@
             staticType: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -44742,10 +50875,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @26
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -44758,6 +50894,7 @@
         supertype: Enum
         fields
           static const enumConstant e1 @37
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::e1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             metadata
               Annotation
@@ -44782,6 +50919,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           static const enumConstant e2 @43
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::e2
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -44798,6 +50936,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           static const enumConstant e3 @54
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::e3
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             metadata
               Annotation
@@ -44822,6 +50961,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -44844,22 +50984,28 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get e1 @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::e1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get e2 @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::e2
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get e3 @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::e3
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
     topLevelVariables
       static const foo @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -44869,6 +51015,7 @@
             staticType: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -44883,10 +51030,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       E @31
+        reference: <thisLibrary>::<definingUnit>::@extension::E
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -44910,6 +51060,7 @@
         extendedType: List<T>
     topLevelVariables
       static const foo @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -44919,6 +51070,7 @@
             staticType: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -44941,13 +51093,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @22
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static isStatic @42
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::isStatic
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             metadata
               Annotation
@@ -44960,6 +51116,7 @@
             type: int
             shouldUseTypeForInitializerInference: false
           static const isStaticConst @79
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::isStaticConst
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             metadata
               Annotation
@@ -44976,6 +51133,7 @@
                 literal: 2 @95
                 staticType: int
           isInstance @112
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::isInstance
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             metadata
               Annotation
@@ -44989,24 +51147,30 @@
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic static get isStatic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::isStatic
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic static set isStatic= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::isStatic
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _isStatic @-1
                 type: int
             returnType: void
           synthetic static get isStaticConst @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::isStaticConst
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic get isInstance @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::isInstance
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic set isInstance= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::isInstance
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _isInstance @-1
@@ -45014,6 +51178,7 @@
             returnType: void
     topLevelVariables
       static const foo @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -45023,6 +51188,7 @@
             staticType: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -45040,6 +51206,7 @@
 library
   name: my.lib
   nameOffset: 37
+  reference: <thisLibrary>
   documentationComment: /// Some documentation.
   metadata
     Annotation
@@ -45050,9 +51217,11 @@
         staticType: null
       element: <thisLibrary>::<definingUnit>::@getter::foo
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const foo @52
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -45062,6 +51231,7 @@
             staticType: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -45076,10 +51246,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @27
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -45104,6 +51277,7 @@
           Object
     topLevelVariables
       static const foo @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -45113,6 +51287,7 @@
             staticType: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -45127,10 +51302,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @34
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         metadata
           Annotation
             atSign: @ @16
@@ -45166,6 +51344,7 @@
           returnType: void
     topLevelVariables
       static const foo @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -45175,6 +51354,7 @@
             staticType: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -45189,10 +51369,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @29
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         metadata
           Annotation
             atSign: @ @16
@@ -45238,6 +51421,7 @@
           returnType: void
     topLevelVariables
       static const foo @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -45247,6 +51431,7 @@
             staticType: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -45276,10 +51461,13 @@
 library
   name: my.lib
   nameOffset: 8
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const foo @65
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -45289,6 +51477,7 @@
             staticType: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
   parts
@@ -45301,6 +51490,7 @@
             staticElement: <thisLibrary>::<definingUnit>::@getter::foo
             staticType: null
           element: <thisLibrary>::<definingUnit>::@getter::foo
+      reference: <thisLibrary>::@unit::package:test/a.dart
       enclosingElement: <thisLibrary>
     package:test/b.dart
       metadata
@@ -45311,6 +51501,7 @@
             staticElement: <thisLibrary>::<definingUnit>::@getter::foo
             staticType: null
           element: <thisLibrary>::<definingUnit>::@getter::foo
+      reference: <thisLibrary>::@unit::package:test/b.dart
       enclosingElement: <thisLibrary>
 ''');
   }
@@ -45324,10 +51515,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const foo @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -45337,10 +51531,12 @@
             staticType: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
     functions
       f @26
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -45363,6 +51559,7 @@
                 element: <thisLibrary>::<definingUnit>::@getter::foo
         parameters
           optionalNamed default a @47
+            reference: <thisLibrary>::<definingUnit>::@function::f::@parameter::a
             type: int?
             metadata
               Annotation
@@ -45389,10 +51586,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const foo @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -45401,13 +51601,16 @@
             literal: 0 @12
             staticType: int
       synthetic static getter @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::getter
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       static get getter @29
+        reference: <thisLibrary>::<definingUnit>::@getter::getter
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -45430,10 +51633,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const foo @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -45442,13 +51648,16 @@
             literal: 0 @12
             staticType: int
       synthetic static setter @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::setter
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       static set setter= @25
+        reference: <thisLibrary>::<definingUnit>::@setter::setter
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -45485,10 +51694,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const foo @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -45497,6 +51709,7 @@
             literal: 0 @12
             staticType: int
       static isNotConst @25
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::isNotConst
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -45509,6 +51722,7 @@
         type: int
         shouldUseTypeForInitializerInference: false
       static const isConst @53
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::isConst
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -45526,18 +51740,22 @@
             staticType: int
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get isNotConst @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::isNotConst
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set isNotConst= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::isNotConst
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _isNotConst @-1
             type: int
         returnType: void
       synthetic static get isConst @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::isConst
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -45554,10 +51772,13 @@
 library
   name: L
   nameOffset: 8
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @37
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -45567,6 +51788,7 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
   parts
@@ -45579,6 +51801,7 @@
             staticElement: <thisLibrary>::<definingUnit>::@getter::a
             staticType: null
           element: <thisLibrary>::<definingUnit>::@getter::a
+      reference: <thisLibrary>::@unit::package:test/foo.dart
       enclosingElement: <thisLibrary>
 ''');
   }
@@ -45605,19 +51828,23 @@
     var library = await buildLibrary('import "a.dart" as a; @a.b class C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart as a @19
       enclosingElement: <thisLibrary>
   prefixes
     a @19
+      reference: <thisLibrary>::@prefix::a
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart as a @19
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @33
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -45637,6 +51864,7 @@
             element: package:test/a.dart::<definingUnit>::@getter::b
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -45645,10 +51873,13 @@
     var library = await buildLibrary('const a = null; f(@a x) {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -45658,10 +51889,12 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
     functions
       f @16
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional x @21
@@ -45688,16 +51921,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @23
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           m @29
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional x @34
@@ -45713,6 +51951,7 @@
             returnType: dynamic
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -45722,6 +51961,7 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -45735,10 +51975,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -45747,13 +51990,16 @@
             literal: null @10
             staticType: Null
       synthetic static foo @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       static set foo= @21
+        reference: <thisLibrary>::<definingUnit>::@setter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional x @32
@@ -45774,10 +52020,13 @@
     var library = await buildLibrary('const a = null; f([@a x = null]) {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -45787,10 +52036,12 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
     functions
       f @16
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           optionalPositional default x @22
@@ -45825,22 +52076,28 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @23
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @29
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional x @35
                 type: int
       class B @48
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           @64
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional final super.x @75
@@ -45857,6 +52114,7 @@
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -45866,6 +52124,7 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -45875,10 +52134,13 @@
     var library = await buildLibrary('const a = null; @a int v;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -45887,6 +52149,7 @@
             literal: null @10
             staticType: Null
       static v @23
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -45899,12 +52162,15 @@
         type: int
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -45917,10 +52183,13 @@
     var library = await buildLibrary('const a = null; class C<@a T> {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @22
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @27
@@ -45935,9 +52204,11 @@
                 element: <thisLibrary>::<definingUnit>::@getter::a
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -45947,6 +52218,7 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -45960,10 +52232,13 @@
 class E {}''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class alias C @22
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @27
@@ -45981,6 +52256,7 @@
           E
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -45991,17 +52267,22 @@
                 staticElement: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             superConstructor: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
       class D @48
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
       class E @59
+        reference: <thisLibrary>::<definingUnit>::@class::E
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::E
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -46011,6 +52292,7 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -46020,10 +52302,13 @@
     var library = await buildLibrary('const a = null; f<@a T>() {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -46033,10 +52318,12 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
     functions
       f @16
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @21
@@ -46057,10 +52344,13 @@
     var library = await buildLibrary('const a = null; typedef F<@a T>();');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @24
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           unrelated T @29
             defaultType: dynamic
@@ -46077,6 +52367,7 @@
           returnType: dynamic
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
@@ -46086,6 +52377,7 @@
             staticType: Null
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -46098,16 +52390,19 @@
 int x = 0;
 ''');
     // Check metadata without asking any other properties.
-    var x = _elementOfDefiningUnit(library, ['@variable', 'x'])
+    var x = _elementOfDefiningUnit(library, ['@topLevelVariable', 'x'])
         as TopLevelVariableElement;
     expect(x.metadata, hasLength(1));
     // Check details.
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -46116,6 +52411,7 @@
             literal: 0 @10
             staticType: int
       static x @20
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -46129,12 +52425,15 @@
         shouldUseTypeForInitializerInference: true
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -46153,13 +52452,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static const x @25
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: false
@@ -46169,12 +52472,15 @@
                 staticType: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic static get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
       class C @45
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -46194,6 +52500,7 @@
             element: <thisLibrary>::<definingUnit>::@class::A::@getter::x
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -46206,10 +52513,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @28
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -46229,13 +52539,16 @@
             element: <thisLibrary>::<definingUnit>::@enum::E::@getter::b
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant a @8
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -46252,6 +52565,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           static const enumConstant b @11
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::b
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -46268,6 +52582,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           static const enumConstant c @14
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::c
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -46284,6 +52599,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -46306,18 +52622,23 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get a @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get b @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get c @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::c
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
 ''');
@@ -46333,10 +52654,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @56
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -46356,13 +52680,16 @@
             element: <thisLibrary>::<definingUnit>::@extension::E::@getter::x
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     extensions
       E @10
+        reference: <thisLibrary>::<definingUnit>::@extension::E
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         fields
           static const x @36
+            reference: <thisLibrary>::<definingUnit>::@extension::E::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::E
             type: int
             shouldUseTypeForInitializerInference: false
@@ -46372,6 +52699,7 @@
                 staticType: int
         accessors
           synthetic static get x @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::E::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::E
             returnType: int
 ''');
@@ -46390,19 +52718,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo.dart as foo @21
       enclosingElement: <thisLibrary>
   prefixes
     foo @21
+      reference: <thisLibrary>::@prefix::foo
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo.dart as foo @21
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @41
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -46427,6 +52759,7 @@
             element: package:test/foo.dart::<definingUnit>::@extension::E::@getter::x
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -46443,32 +52776,42 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           call @19
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::call
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: double
       class B @42
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           a @50
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           synthetic get a @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: A
           synthetic set a= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _a @-1
@@ -46476,14 +52819,17 @@
             returnType: void
     topLevelVariables
       static c @59
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
@@ -46508,31 +52854,42 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @17
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
       class C @28
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       class D @39
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
     mixins
       mixin M @51
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @53
@@ -46548,28 +52905,35 @@
           D
         fields
           f @101
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             type: T
           synthetic g @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@field::g
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             type: U
           synthetic s @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@field::s
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             type: int
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             returnType: T
           synthetic set f= @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@setter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             parameters
               requiredPositional _f @-1
                 type: T
             returnType: void
           get g @112
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@getter::g
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             returnType: U
           set s= @126
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@setter::s
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             parameters
               requiredPositional v @132
@@ -46577,6 +52941,7 @@
             returnType: void
         methods
           m @144
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             parameters
               requiredPositional v @153
@@ -46591,10 +52956,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       base mixin M @11
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -46608,20 +52976,25 @@
 }''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
         fields
           final x @18
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             type: int
             shouldUseTypeForInitializerInference: false
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             returnType: int
 ''');
@@ -46649,19 +53022,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             type: int
         accessors
           get foo @25 invokesSuperSelf
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             returnType: int
 ''');
@@ -46677,19 +53055,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             type: int
         accessors
           get foo @25 invokesSuperSelf
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             returnType: int
 ''');
@@ -46705,19 +53088,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             type: int
         accessors
           get foo @25
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             returnType: int
 ''');
@@ -46729,10 +53117,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -46747,30 +53138,37 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @42
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A<int>
         mixins
           M<int>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
               substitution: {T: int}
     mixins
       mixin M @20
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant U @22
@@ -46792,18 +53190,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class alias B @20
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @22
@@ -46813,6 +53216,7 @@
           A<T>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             constantInitializers
               SuperConstructorInvocation
@@ -46822,12 +53226,14 @@
                   rightParenthesis: ) @0
                 staticElement: dart:core::<definingUnit>::@class::Object::@constructor::new
       class alias C @51
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A<int>
         mixins
           B<dynamic>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -46857,26 +53263,33 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A1 @6
+        reference: <thisLibrary>::<definingUnit>::@class::A1
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @9
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A1
       class A2 @21
+        reference: <thisLibrary>::<definingUnit>::@class::A2
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @24
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A2::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A2
       class alias B @36
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @38
@@ -46887,6 +53300,7 @@
           A2<T>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             constantInitializers
               SuperConstructorInvocation
@@ -46896,19 +53310,23 @@
                   rightParenthesis: ) @0
                 staticElement: dart:core::<definingUnit>::@class::Object::@constructor::new
       class Base @75
+        reference: <thisLibrary>::<definingUnit>::@class::Base
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A1<int>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::Base::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::Base
       class alias C @108
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Base
         mixins
           B<int>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             constantInitializers
               SuperConstructorInvocation
@@ -46929,30 +53347,37 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class C @57
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A<int Function(String)>
         mixins
           M<int, String>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
               substitution: {T: int Function(String)}
     mixins
       mixin M @20
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @22
@@ -46972,30 +53397,37 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @17
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class C @57
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A<List<int>>
         mixins
           M<int>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
               substitution: {T: List<int>}
     mixins
       mixin M @29
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @31
@@ -47015,18 +53447,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class I @6
+        reference: <thisLibrary>::<definingUnit>::@class::I
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant X @8
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I
       class alias A @66
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: I<int>
         mixins
@@ -47034,6 +53471,7 @@
           M2<int>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             constantInitializers
               SuperConstructorInvocation
@@ -47047,6 +53485,7 @@
               substitution: {X: int}
     mixins
       mixin M1 @20
+        reference: <thisLibrary>::<definingUnit>::@mixin::M1
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @23
@@ -47054,6 +53493,7 @@
         superclassConstraints
           I<T>
       mixin M2 @43
+        reference: <thisLibrary>::<definingUnit>::@mixin::M2
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @46
@@ -47075,18 +53515,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class S @62
+        reference: <thisLibrary>::<definingUnit>::@class::S
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T3 @64
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::S::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::S
       class X @78
+        reference: <thisLibrary>::<definingUnit>::@class::X
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: S<String>
         mixins
@@ -47096,12 +53541,14 @@
                 String
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::S::@constructor::new
               substitution: {T3: String}
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -47112,6 +53559,7 @@
           S<T>
     typeAliases
       M2 @34
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::M2
         typeParameters
           covariant T2 @37
             defaultType: dynamic
@@ -47133,18 +53581,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class S @88
+        reference: <thisLibrary>::<definingUnit>::@class::S
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T4 @90
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::S::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::S
       class X @104
+        reference: <thisLibrary>::<definingUnit>::@class::X
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: S<String>
         mixins
@@ -47154,12 +53607,14 @@
                 String
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::S::@constructor::new
               substitution: {T4: String}
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -47170,11 +53625,13 @@
           S<T>
     typeAliases
       M2 @34
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::M2
         typeParameters
           covariant T2 @37
             defaultType: dynamic
         aliasedType: M<T2, int>
       M3 @64
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::M3
         typeParameters
           covariant T3 @67
             defaultType: dynamic
@@ -47195,29 +53652,37 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
       class C @45
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
     extensionTypes
       B @26
+        reference: <thisLibrary>::<definingUnit>::@extensionType::B
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::B::@constructor::new
         typeErasure: int
         fields
           final it @32
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             returnType: int
     mixins
       mixin M @56
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -47237,15 +53702,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
         methods
           foo @22 invokesSuperSelf
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             returnType: void
 ''');
@@ -47260,21 +53729,27 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     mixins
       mixin B @17
+        reference: <thisLibrary>::<definingUnit>::@mixin::B
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           A
         methods
           A @33
+            reference: <thisLibrary>::<definingUnit>::@mixin::B::@method::A
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::B
             returnType: void
 ''');
@@ -47290,19 +53765,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             type: int
         accessors
           set foo= @21
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             parameters
               requiredPositional _ @29
@@ -47321,19 +53801,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             type: int
         accessors
           set foo= @21 invokesSuperSelf
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             parameters
               requiredPositional _ @29
@@ -47352,29 +53837,37 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
       class C @45
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
     extensionTypes
       B @26
+        reference: <thisLibrary>::<definingUnit>::@extensionType::B
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::B::@constructor::new
         typeErasure: int
         fields
           final it @32
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             returnType: int
     mixins
       mixin M @56
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           A
@@ -47386,10 +53879,13 @@
     var library = await buildLibrary('mixin M<in T> {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           contravariant T @11
@@ -47403,10 +53899,13 @@
     var library = await buildLibrary('mixin M<out T> {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @12
@@ -47420,10 +53919,13 @@
     var library = await buildLibrary('mixin M<inout T> {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           invariant T @14
@@ -47437,10 +53939,13 @@
     var library = await buildLibrary('mixin M<inout T, in U, out V> {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           invariant T @14
@@ -47466,24 +53971,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/c.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/c.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static v @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
         shouldUseTypeForInitializerInference: true
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -47505,24 +54015,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/d.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/d.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static v @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
         shouldUseTypeForInitializerInference: true
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -47548,24 +54063,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/c.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/c.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static v @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
         shouldUseTypeForInitializerInference: true
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -47588,12 +54108,14 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
     package:test/b.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
@@ -47602,14 +54124,17 @@
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static v @36
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: A
         shouldUseTypeForInitializerInference: true
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -47627,15 +54152,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
           named @21
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             periodOffset: 20
             nameEnd: 26
@@ -47650,13 +54180,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @18
@@ -47672,24 +54206,31 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           foo @16
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: true
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _foo @-1
@@ -47706,20 +54247,26 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           get foo @20
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
 ''');
@@ -47733,16 +54280,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           foo @17
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             typeParameters
               covariant T @21
@@ -47762,20 +54314,26 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           set foo= @16
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional x @24
@@ -47790,16 +54348,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
 ''');
   }
@@ -47810,10 +54372,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       E @10
+        reference: <thisLibrary>::<definingUnit>::@extension::E
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @12
@@ -47828,10 +54393,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional f @12
@@ -47851,13 +54419,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredNamed default f @22
+            reference: <thisLibrary>::<definingUnit>::@function::f::@parameter::f
             type: void Function<U>(int)
             typeParameters
               covariant U @24
@@ -47874,10 +54446,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @7
@@ -47892,10 +54467,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @13
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           unrelated T @15
             defaultType: dynamic
@@ -47911,10 +54489,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           unrelated T @10
             defaultType: dynamic
@@ -47930,10 +54511,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -47949,14 +54533,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static foo @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
     accessors
       static get foo @8
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -47973,10 +54561,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -47985,9 +54576,11 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           g @23
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::g
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             typeParameters
               covariant V @25
@@ -48015,10 +54608,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -48027,9 +54623,11 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           g @23
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::g
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             typeParameters
               covariant V @25
@@ -48051,10 +54649,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @7
@@ -48082,10 +54683,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @7
@@ -48103,14 +54707,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       notSimplyBounded F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: dynamic Function()
         aliasedElement: GenericFunctionTypeElement
           returnType: dynamic
       notSimplyBounded G @34
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::G
         aliasedType: dynamic Function()
         aliasedElement: GenericFunctionTypeElement
           returnType: dynamic
@@ -48123,10 +54731,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       notSimplyBounded F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: List<dynamic> Function()
         aliasedElement: GenericFunctionTypeElement
           returnType: List<dynamic>
@@ -48139,10 +54750,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       notSimplyBounded F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           unrelated T @10
             bound: dynamic
@@ -48159,10 +54773,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           unrelated T @10
             defaultType: dynamic
@@ -48178,10 +54795,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: void Function()
         aliasedElement: GenericFunctionTypeElement
           returnType: void
@@ -48194,10 +54814,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       notSimplyBounded F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           unrelated T @10
             bound: dynamic
@@ -48212,10 +54835,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       notSimplyBounded F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: List<dynamic>
 ''');
   }
@@ -48229,27 +54855,34 @@
     configuration.withNonSynthetic = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           foo @16
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: true
             nonSynthetic: <thisLibrary>::<definingUnit>::@class::C::@field::foo
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             nonSynthetic: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
             nonSynthetic: <thisLibrary>::<definingUnit>::@class::C::@field::foo
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _foo @-1
@@ -48269,22 +54902,28 @@
     configuration.withNonSynthetic = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             nonSynthetic: <thisLibrary>::<definingUnit>::@class::C::@getter::foo
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             nonSynthetic: <thisLibrary>::<definingUnit>::@class::C
         accessors
           get foo @20
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
             nonSynthetic: <thisLibrary>::<definingUnit>::@class::C::@getter::foo
@@ -48300,22 +54939,28 @@
     configuration.withNonSynthetic = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             nonSynthetic: <thisLibrary>::<definingUnit>::@class::C::@setter::foo
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             nonSynthetic: <thisLibrary>::<definingUnit>::@class::C
         accessors
           set foo= @16
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional value @24
@@ -48335,14 +54980,18 @@
     configuration.withNonSynthetic = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant a @11
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -48360,6 +55009,7 @@
                 staticType: E
             nonSynthetic: <thisLibrary>::<definingUnit>::@enum::E::@field::a
           static const enumConstant b @14
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::b
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -48377,6 +55027,7 @@
                 staticType: E
             nonSynthetic: <thisLibrary>::<definingUnit>::@enum::E::@field::b
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -48396,18 +55047,22 @@
             nonSynthetic: <thisLibrary>::<definingUnit>::@enum::E
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             nonSynthetic: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get a @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
             nonSynthetic: <thisLibrary>::<definingUnit>::@enum::E::@field::a
           synthetic static get b @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
             nonSynthetic: <thisLibrary>::<definingUnit>::@enum::E::@field::b
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
             nonSynthetic: <thisLibrary>::<definingUnit>::@enum::E
@@ -48423,19 +55078,24 @@
     configuration.withNonSynthetic = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       E @10
+        reference: <thisLibrary>::<definingUnit>::@extension::E
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::E::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::E
             type: int
             nonSynthetic: <thisLibrary>::<definingUnit>::@extension::E::@getter::foo
         accessors
           get foo @31
+            reference: <thisLibrary>::<definingUnit>::@extension::E::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::E
             returnType: int
             nonSynthetic: <thisLibrary>::<definingUnit>::@extension::E::@getter::foo
@@ -48451,19 +55111,24 @@
     configuration.withNonSynthetic = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       E @10
+        reference: <thisLibrary>::<definingUnit>::@extension::E
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::E::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::E
             type: int
             nonSynthetic: <thisLibrary>::<definingUnit>::@extension::E::@setter::foo
         accessors
           set foo= @27
+            reference: <thisLibrary>::<definingUnit>::@extension::E::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::E
             parameters
               requiredPositional value @35
@@ -48483,25 +55148,31 @@
     configuration.withNonSynthetic = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
         fields
           foo @16
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             type: int
             shouldUseTypeForInitializerInference: true
             nonSynthetic: <thisLibrary>::<definingUnit>::@mixin::M::@field::foo
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             returnType: int
             nonSynthetic: <thisLibrary>::<definingUnit>::@mixin::M::@field::foo
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             parameters
               requiredPositional _foo @-1
@@ -48521,20 +55192,25 @@
     configuration.withNonSynthetic = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             type: int
             nonSynthetic: <thisLibrary>::<definingUnit>::@mixin::M::@getter::foo
         accessors
           get foo @20
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             returnType: int
             nonSynthetic: <thisLibrary>::<definingUnit>::@mixin::M::@getter::foo
@@ -48550,20 +55226,25 @@
     configuration.withNonSynthetic = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             type: int
             nonSynthetic: <thisLibrary>::<definingUnit>::@mixin::M::@setter::foo
         accessors
           set foo= @16
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             parameters
               requiredPositional value @24
@@ -48581,15 +55262,19 @@
     configuration.withNonSynthetic = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static foo @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         nonSynthetic: <thisLibrary>::<definingUnit>::@getter::foo
     accessors
       static get foo @8
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
         nonSynthetic: <thisLibrary>::<definingUnit>::@getter::foo
@@ -48604,19 +55289,24 @@
     configuration.withNonSynthetic = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static foo @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         nonSynthetic: <thisLibrary>::<definingUnit>::@getter::foo
     accessors
       static get foo @8
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
         nonSynthetic: <thisLibrary>::<definingUnit>::@getter::foo
       static set foo= @22
+        reference: <thisLibrary>::<definingUnit>::@setter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional value @30
@@ -48634,15 +55324,19 @@
     configuration.withNonSynthetic = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static foo @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         nonSynthetic: <thisLibrary>::<definingUnit>::@setter::foo
     accessors
       static set foo= @4
+        reference: <thisLibrary>::<definingUnit>::@setter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional value @12
@@ -48660,27 +55354,32 @@
     configuration.withNonSynthetic = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static foo @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
-        nonSynthetic: <thisLibrary>::<definingUnit>::@variable::foo
+        nonSynthetic: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
-        nonSynthetic: <thisLibrary>::<definingUnit>::@variable::foo
+        nonSynthetic: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
       synthetic static set foo= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _foo @-1
             type: int
-            nonSynthetic: <thisLibrary>::<definingUnit>::@variable::foo
+            nonSynthetic: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         returnType: void
-        nonSynthetic: <thisLibrary>::<definingUnit>::@variable::foo
+        nonSynthetic: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
 ''');
   }
 
@@ -48688,10 +55387,13 @@
     var library = await buildLibrary('void main(int p) {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       main @5
+        reference: <thisLibrary>::<definingUnit>::@function::main
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional p @14
@@ -48708,19 +55410,25 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @17
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               optionalNamed default covariant a @32
+                reference: <thisLibrary>::<definingUnit>::@class::A::@method::m::@parameter::a
                 type: A
             returnType: void
 ''');
@@ -48734,16 +55442,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @17
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               optionalPositional default covariant a @32
@@ -48760,16 +55473,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @17
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional covariant a @31
@@ -48789,25 +55507,31 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           f @20
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional covariant t @34
                 type: T
             returnType: void
       class B @48
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @50
@@ -48815,12 +55539,14 @@
         supertype: A<T>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
               substitution: {T: T}
         methods
           f @75
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional covariant t @79
@@ -48840,33 +55566,43 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @17
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               optionalNamed default covariant a @32
+                reference: <thisLibrary>::<definingUnit>::@class::A::@method::m::@parameter::a
                 type: A
             returnType: void
       class B @47
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         methods
           m @68
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               optionalNamed default covariant a @73
+                reference: <thisLibrary>::<definingUnit>::@class::B::@method::m::@parameter::a
                 type: B
             returnType: void
 ''');
@@ -48876,16 +55612,21 @@
     var library = await buildLibrary('class C { f(g(x, y)) {} }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           f @10
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional g @12
@@ -48903,10 +55644,13 @@
     var library = await buildLibrary('class C<A, B> { f(A g(B x)) {} }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant A @8
@@ -48915,9 +55659,11 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           f @16
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional g @20
@@ -48933,16 +55679,21 @@
     var library = await buildLibrary('class C { f(int g()) {} }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           f @10
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional g @16
@@ -48955,16 +55706,21 @@
     var library = await buildLibrary('class C { f(void g()) {} }');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           f @10
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional g @17
@@ -48979,10 +55735,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @9
@@ -49008,13 +55767,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           positional @14
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::positional
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 13
             nameEnd: 24
@@ -49026,11 +55789,13 @@
                     literal: 1 @30
                     staticType: int
           named @39
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 38
             nameEnd: 44
             parameters
               optionalNamed default x @46
+                reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named::@parameter::x
                 type: dynamic
                 constantInitializer
                   IntegerLiteral
@@ -49051,17 +55816,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @16
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           positional @23
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::positional
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 22
             nameEnd: 33
@@ -49074,11 +55844,13 @@
                     staticType: int
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
           named @53
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             periodOffset: 52
             nameEnd: 58
             parameters
               optionalNamed default final this.x @65
+                reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::named::@parameter::x
                 type: dynamic
                 constantInitializer
                   IntegerLiteral
@@ -49087,9 +55859,11 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::x
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -49109,16 +55883,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           static positional @24
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::positional
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               optionalPositional default x @36
@@ -49129,9 +55908,11 @@
                     staticType: int
             returnType: void
           static named @61
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               optionalNamed default x @68
+                reference: <thisLibrary>::<definingUnit>::@class::C::@method::named::@parameter::x
                 type: dynamic
                 constantInitializer
                   IntegerLiteral
@@ -49151,10 +55932,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       positional @5
+        reference: <thisLibrary>::<definingUnit>::@function::positional
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           optionalPositional default x @17
@@ -49165,9 +55949,11 @@
                 staticType: int
         returnType: void
       named @33
+        reference: <thisLibrary>::<definingUnit>::@function::named
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           optionalNamed default x @40
+            reference: <thisLibrary>::<definingUnit>::@function::named::@parameter::x
             type: dynamic
             constantInitializer
               IntegerLiteral
@@ -49186,10 +55972,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: void
 ''');
@@ -49203,20 +55992,26 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final x @32
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: (int, String)
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: (int, String)
 ''');
@@ -49230,21 +56025,27 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final x @18
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: (int, bool)
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: (int, bool)
 ''');
@@ -49258,16 +56059,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           foo @17
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @35
@@ -49284,16 +56090,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           foo @26
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: (int, String)
 ''');
@@ -49305,10 +56116,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -49316,6 +56130,7 @@
             defaultType: (int, String)
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
 ''');
   }
@@ -49326,10 +56141,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       IntStringExtension @10
+        reference: <thisLibrary>::<definingUnit>::@extension::IntStringExtension
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: (int, String)
 ''');
@@ -49341,10 +56159,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional b @38
@@ -49359,10 +56180,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @32
@@ -49377,10 +56201,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @21
@@ -49395,10 +56222,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @3
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: ()
 ''');
@@ -49410,10 +56240,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @9
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @11
@@ -49428,10 +56261,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @24
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: (int, String, {bool c})
 ''');
@@ -49443,10 +56279,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @20
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: ({int a, String b})
 ''');
@@ -49458,10 +56297,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @32
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: ((int, String), (bool, double))
 ''');
@@ -49473,10 +56315,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @15
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: (int, String)?
 ''');
@@ -49488,10 +56333,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @14
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: (int, String)
 ''');
@@ -49503,10 +56351,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @7
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: (int,)
 ''');
@@ -49518,14 +56369,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static final x @20
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: (int, String)
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: (int, String)
 ''');
@@ -49537,15 +56392,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static final x @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: (int, bool)
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: (int, bool)
 ''');
@@ -49557,10 +56416,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const x @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Type
         shouldUseTypeForInitializerInference: false
@@ -49597,6 +56459,7 @@
             staticType: Type
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Type
 ''');
@@ -49608,10 +56471,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const x @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Type
         shouldUseTypeForInitializerInference: false
@@ -49644,6 +56510,7 @@
             staticType: Type
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Type
 ''');
@@ -49658,14 +56525,18 @@
 void set x(value) {}''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static x @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
     accessors
       static set x= @69
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /**\n * Docs\n */
         parameters
@@ -49679,14 +56550,18 @@
     var library = await buildLibrary('external void set x(int value);');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static x @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
     accessors
       static external set x= @18
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional value @24
@@ -49699,14 +56574,18 @@
     var library = await buildLibrary('set f(int value) {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static f @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
     accessors
       static set f= @4
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional value @10
@@ -49720,23 +56599,29 @@
         await buildLibrary('void set x(int value) {} set y(value) {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static x @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
       synthetic static y @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::y
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
     accessors
       static set x= @9
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional value @15
             type: int
         returnType: void
       static set y= @29
+        reference: <thisLibrary>::<definingUnit>::@setter::y
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional value @31
@@ -49763,22 +56648,28 @@
       ..withConstructors = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @47
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         sinceSdkVersion: 2.15.0
         constructors
           named @55
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             sinceSdkVersion: 2.15.0
             periodOffset: 54
             nameEnd: 60
       class B @73
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           named @81
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             periodOffset: 80
             nameEnd: 86
@@ -49797,24 +56688,30 @@
     configuration.forSinceSdkVersion();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @47
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         sinceSdkVersion: 2.15.0
         fields
           foo @57
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             sinceSdkVersion: 2.15.0
             type: int
             shouldUseTypeForInitializerInference: true
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             sinceSdkVersion: 2.15.0
             returnType: int
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             sinceSdkVersion: 2.15.0
             parameters
@@ -49836,18 +56733,23 @@
     configuration.forSinceSdkVersion();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @47
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         sinceSdkVersion: 2.15.0
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         accessors
           get foo @61
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             sinceSdkVersion: 2.15.0
             returnType: int
@@ -49866,14 +56768,18 @@
     configuration.forSinceSdkVersion();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @47
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         sinceSdkVersion: 2.15.0
         methods
           foo @58
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             sinceSdkVersion: 2.15.0
             returnType: void
@@ -49893,14 +56799,18 @@
     configuration.forSinceSdkVersion();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @47
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         sinceSdkVersion: 2.15.0
         methods
           foo @75
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             sinceSdkVersion: 2.16.0
             returnType: void
@@ -49920,14 +56830,18 @@
     configuration.forSinceSdkVersion();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @47
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         sinceSdkVersion: 2.15.0
         methods
           foo @75
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             sinceSdkVersion: 2.15.0
             returnType: void
@@ -49946,18 +56860,23 @@
     configuration.forSinceSdkVersion();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @47
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         sinceSdkVersion: 2.15.0
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         accessors
           set foo= @57
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             sinceSdkVersion: 2.15.0
             parameters
@@ -49980,34 +56899,43 @@
     configuration.forSinceSdkVersion();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @31
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v1 @37
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
           static const enumConstant v2 @60
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v2
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             sinceSdkVersion: 2.15.0
             type: E
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
         accessors
           synthetic static get v1 @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get v2 @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v2
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             sinceSdkVersion: 2.15.0
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
 ''');
@@ -50026,32 +56954,40 @@
     configuration.forSinceSdkVersion();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @46
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         sinceSdkVersion: 2.15.0
         supertype: Enum
         fields
           static const enumConstant v @52
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             sinceSdkVersion: 2.15.0
             type: E
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             sinceSdkVersion: 2.15.0
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
         methods
           foo @62
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             sinceSdkVersion: 2.15.0
             returnType: void
@@ -50070,15 +57006,19 @@
     configuration.forSinceSdkVersion();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       E @51
+        reference: <thisLibrary>::<definingUnit>::@extension::E
         enclosingElement: <thisLibrary>::<definingUnit>
         sinceSdkVersion: 2.15.0
         extendedType: int
         methods
           foo @69
+            reference: <thisLibrary>::<definingUnit>::@extension::E::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::E
             sinceSdkVersion: 2.15.0
             returnType: void
@@ -50097,16 +57037,20 @@
     configuration.forSinceSdkVersion();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin M @47
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         sinceSdkVersion: 2.15.0
         superclassConstraints
           Object
         methods
           foo @58
+            reference: <thisLibrary>::<definingUnit>::@mixin::M::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::M
             sinceSdkVersion: 2.15.0
             returnType: void
@@ -50125,14 +57069,18 @@
     configuration.forSinceSdkVersion();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       foo @46
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         sinceSdkVersion: 2.15.0
         returnType: void
       bar @61
+        reference: <thisLibrary>::<definingUnit>::@function::bar
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: void
 ''');
@@ -50148,10 +57096,13 @@
     configuration.forSinceSdkVersion();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       foo @54
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         sinceSdkVersion: 2.15.3-dev.7
         returnType: void
@@ -50168,10 +57119,13 @@
     configuration.forSinceSdkVersion();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       foo @48
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         sinceSdkVersion: 2.15.3
         returnType: void
@@ -50188,10 +57142,13 @@
     configuration.forSinceSdkVersion();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       foo @44
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: void
 ''');
@@ -50209,11 +57166,14 @@
     configuration.forSinceSdkVersion();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   sinceSdkVersion: 2.15.0
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       foo @56
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         sinceSdkVersion: 2.15.0
         returnType: void
@@ -50232,15 +57192,19 @@
     configuration.forSinceSdkVersion();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @31
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional p1 @37
             type: int
           optionalNamed default p2 @67
+            reference: <thisLibrary>::<definingUnit>::@function::f::@parameter::p2
             type: int?
             sinceSdkVersion: 2.15.0
         returnType: void
@@ -50259,10 +57223,13 @@
     configuration.forSinceSdkVersion();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @31
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional p1 @37
@@ -50284,10 +57251,13 @@
     configuration.forSinceSdkVersion();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @49
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         sinceSdkVersion: 2.15.0
         aliasedType: List<int>
 ''');
@@ -50303,16 +57273,20 @@
     configuration.forSinceSdkVersion();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static final foo @47
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         sinceSdkVersion: 2.15.0
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         sinceSdkVersion: 2.15.0
         returnType: int
@@ -50326,19 +57300,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static final v @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int Function<T>(T)
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function<T>(T)
     functions
       f @52
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
 ''');
@@ -50352,10 +57331,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @7
@@ -50378,10 +57360,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -50390,17 +57375,21 @@
             defaultType: dynamic
         fields
           v @22
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int Function(T, U)
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get v @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int Function(T, U)
           synthetic set v= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _v @-1
@@ -50408,6 +57397,7 @@
             returnType: void
     functions
       f @74
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
 ''');
@@ -50421,10 +57411,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @5
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @7
@@ -50445,19 +57438,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static final v @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int Function()
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function()
     functions
       f @40
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
 ''');
@@ -50470,19 +57468,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static final v @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int Function(int, String)
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function(int, String)
     functions
       f @70
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
 ''');
@@ -50494,17 +57497,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static i @13
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::i
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
     accessors
       synthetic static get i @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::i
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set i= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::i
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _i @-1
@@ -50517,17 +57525,22 @@
     var library = await buildLibrary('Map<dynamic, dynamic> m;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static m @22
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::m
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Map<dynamic, dynamic>
     accessors
       synthetic static get m @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::m
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Map<dynamic, dynamic>
       synthetic static set m= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::m
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _m @-1
@@ -50540,17 +57553,22 @@
     var library = await buildLibrary('Map<dynamic, int> m;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static m @18
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::m
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Map<dynamic, int>
     accessors
       synthetic static get m @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::m
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Map<dynamic, int>
       synthetic static set m= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::m
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _m @-1
@@ -50563,17 +57581,22 @@
     var library = await buildLibrary('Map<String, dynamic> m;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static m @21
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::m
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Map<String, dynamic>
     accessors
       synthetic static get m @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::m
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Map<String, dynamic>
       synthetic static set m= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::m
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _m @-1
@@ -50586,17 +57609,22 @@
     var library = await buildLibrary('Map<String, int> m;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static m @17
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::m
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Map<String, int>
     accessors
       synthetic static get m @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::m
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Map<String, int>
       synthetic static set m= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::m
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _m @-1
@@ -50609,17 +57637,22 @@
     var library = await buildLibrary('Map m;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static m @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::m
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Map<dynamic, dynamic>
     accessors
       synthetic static get m @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::m
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Map<dynamic, dynamic>
       synthetic static set m= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::m
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _m @-1
@@ -50632,17 +57665,22 @@
     var library = await buildLibrary('dynamic d;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static d @8
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::d
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
     accessors
       synthetic static get d @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::d
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set d= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::d
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _d @-1
@@ -50661,31 +57699,39 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static a @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int Function()
         shouldUseTypeForInitializerInference: false
       static b @42
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function()
       synthetic static set a= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _a @-1
             type: int Function()
         returnType: void
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set b= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _b @-1
@@ -50702,27 +57748,33 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart deferred as a @28
       enclosingElement: <thisLibrary>
   prefixes
     a @28
+      reference: <thisLibrary>::@prefix::a
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart deferred as a @28
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static x @35
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Future<dynamic> Function()
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Future<dynamic> Function()
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -50737,18 +57789,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static x @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int Function(int Function(String))
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function(int Function(String))
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -50763,18 +57820,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static x @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int Function(int Function(String))
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function(int Function(String))
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -50792,24 +57854,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static y @21
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::y
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get y @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::y
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set y= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::y
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _y @-1
@@ -50827,19 +57894,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static final x @25
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             typeInferenceError: dependencyCycle
               arguments: [x, y]
             type: dynamic
             shouldUseTypeForInitializerInference: false
           static final y @51
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             typeInferenceError: dependencyCycle
               arguments: [x, y]
@@ -50847,12 +57919,15 @@
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic static get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: dynamic
           synthetic static get y @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: dynamic
 ''');
@@ -50868,23 +57943,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static final a @25
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             typeInferenceError: dependencyCycle
               arguments: [a, c]
             type: dynamic
             shouldUseTypeForInitializerInference: false
           static final b @49
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: A
             shouldUseTypeForInitializerInference: false
           final c @66
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::c
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             typeInferenceError: dependencyCycle
               arguments: [a, c]
@@ -50892,15 +57973,19 @@
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic static get a @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: dynamic
           synthetic static get b @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: A
           synthetic get c @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::c
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: dynamic
 ''');
@@ -50920,20 +58005,25 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         fields
           value @17
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::value
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: T
         constructors
           @27
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional final this.value @34
@@ -50941,29 +58031,36 @@
                 field: <thisLibrary>::<definingUnit>::@class::A::@field::value
         accessors
           synthetic get value @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::value
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: T
           synthetic set value= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::value
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _value @-1
                 type: T
             returnType: void
       class B @51
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           a @61
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: A<String>
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           synthetic get a @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: A<String>
           synthetic set a= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _a @-1
@@ -50990,20 +58087,25 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         fields
           value @17
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::value
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: T
         constructors
           @27
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional final this.value @34
@@ -51011,15 +58113,18 @@
                 field: <thisLibrary>::<definingUnit>::@class::A::@field::value
         accessors
           synthetic get value @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::value
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: T
           synthetic set value= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::value
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _value @-1
                 type: T
             returnType: void
       class alias B @51
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @53
@@ -51029,6 +58134,7 @@
           M
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional final value @-1
@@ -51049,20 +58155,25 @@
               base: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
               substitution: {T: T}
       class C @78
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           a @88
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: B<int>
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get a @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: B<int>
           synthetic set a= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _a @-1
@@ -51070,6 +58181,7 @@
             returnType: void
     mixins
       mixin M @112
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -51085,21 +58197,26 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         fields
           f @19
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: false
         constructors
           @28
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional final this.f @35
@@ -51107,9 +58224,11 @@
                 field: <thisLibrary>::<definingUnit>::@class::A::@field::f
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic set f= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _f @-1
@@ -51128,25 +58247,31 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @12
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _ @14
                 type: dynamic
     topLevelVariables
       static final a @26
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [a, b]
         type: dynamic
         shouldUseTypeForInitializerInference: false
       static final b @48
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [a, b]
@@ -51154,9 +58279,11 @@
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -51172,12 +58299,14 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
     package:test/b.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
@@ -51186,14 +58315,17 @@
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static v @38
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: InvalidType
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: InvalidType
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -51208,18 +58340,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static x @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic Function(dynamic) Function(dynamic)
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic Function(dynamic) Function(dynamic)
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -51234,18 +58371,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static x @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int Function(int) Function(int)
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function(int) Function(int)
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -51260,18 +58402,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static x @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic Function([dynamic])
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic Function([dynamic])
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -51289,20 +58436,25 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static final a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
       static final b @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [b, c]
         type: dynamic
         shouldUseTypeForInitializerInference: false
       static final c @32
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [b, c]
@@ -51310,12 +58462,15 @@
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -51330,33 +58485,41 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static final a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [a, b]
         type: dynamic
         shouldUseTypeForInitializerInference: false
       static final b @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [a, b]
         type: dynamic
         shouldUseTypeForInitializerInference: false
       static final c @32
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -51373,28 +58536,34 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static final a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [a, d]
         type: dynamic
         shouldUseTypeForInitializerInference: false
       static final b @23
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [b, c]
         type: dynamic
         shouldUseTypeForInitializerInference: false
       static final c @36
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [b, c]
         type: dynamic
         shouldUseTypeForInitializerInference: false
       static final d @49
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::d
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [a, d]
@@ -51402,15 +58571,19 @@
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static get d @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::d
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -51431,22 +58604,27 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static final a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [a, b]
         type: dynamic
         shouldUseTypeForInitializerInference: false
       static final b @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [b, c]
         type: dynamic
         shouldUseTypeForInitializerInference: false
       static final c @36
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [b, c]
@@ -51454,12 +58632,15 @@
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -51481,22 +58662,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @18
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
       class C @40
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @42
@@ -51504,10 +58692,12 @@
             defaultType: A
         fields
           final f @67
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: T
         constructors
           const @78
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional final this.f @85
@@ -51515,22 +58705,27 @@
                 field: <thisLibrary>::<definingUnit>::@class::C::@field::f
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: T
     topLevelVariables
       static final b @98
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: B
         shouldUseTypeForInitializerInference: false
       static final c @113
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C<B>
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: B
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C<B>
 ''');
@@ -51545,30 +58740,38 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       <null> @-1
+        reference: <thisLibrary>::<definingUnit>::@extension::0
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: String
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::0::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::0
             type: int
         accessors
           get foo @32
+            reference: <thisLibrary>::<definingUnit>::@extension::0::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::0
             returnType: int
     topLevelVariables
       static v @48
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -51587,10 +58790,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -51598,9 +58804,11 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     typeAliases
       functionTypeAliasBased F @34
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: dynamic Function(dynamic)
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -51609,27 +58817,33 @@
           returnType: dynamic
     topLevelVariables
       static V2 @56
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V2
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: true
       static V @71
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
     accessors
       synthetic static get V2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set V2= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::V2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _V2 @-1
             type: dynamic
         returnType: void
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set V= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _V @-1
@@ -51637,6 +58851,7 @@
         returnType: void
     functions
       f @44
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional p @48
@@ -51652,29 +58867,37 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static V @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
       static V2 @22
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V2
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<dynamic>
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set V= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _V @-1
             type: dynamic
         returnType: void
       synthetic static get V2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<dynamic>
       synthetic static set V2= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::V2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _V2 @-1
@@ -51691,19 +58914,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           m @15
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional p @21
@@ -51718,17 +58946,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static v @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: InvalidType
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: InvalidType
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -51741,17 +58974,22 @@
     var library = await buildLibrary('Never d;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static d @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::d
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Never
     accessors
       synthetic static get d @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::d
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Never
       synthetic static set d= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::d
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _d @-1
@@ -51768,26 +59006,33 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         fields
           t @17
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::t
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: T
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get t @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::t
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: T
           synthetic set t= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::t
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _t @-1
@@ -51804,26 +59049,33 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         fields
           t @18
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::t
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: T?
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get t @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::t
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: T?
           synthetic set t= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::t
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _t @-1
@@ -51842,20 +59094,26 @@
 F f;''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     enums
       enum E @16
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @20
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -51872,6 +59130,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -51886,54 +59145,67 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
     typeAliases
       functionTypeAliasBased F @32
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: dynamic Function()
         aliasedElement: GenericFunctionTypeElement
           returnType: dynamic
     topLevelVariables
       static c @39
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
       static e @44
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::e
         enclosingElement: <thisLibrary>::<definingUnit>
         type: E
       static f @49
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic Function()
           alias: <thisLibrary>::<definingUnit>::@typeAlias::F
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
             type: C
         returnType: void
       synthetic static get e @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: E
       synthetic static set e= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _e @-1
             type: E
         returnType: void
       synthetic static get f @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic Function()
           alias: <thisLibrary>::<definingUnit>::@typeAlias::F
       synthetic static set f= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _f @-1
@@ -51952,43 +59224,54 @@
 library
   name: l
   nameOffset: 8
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static c @28
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
       static e @33
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::e
         enclosingElement: <thisLibrary>::<definingUnit>
         type: E
       static f @38
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic Function()
           alias: <thisLibrary>::@unit::package:test/a.dart::@typeAlias::F
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
             type: C
         returnType: void
       synthetic static get e @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: E
       synthetic static set e= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _e @-1
             type: E
         returnType: void
       synthetic static get f @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic Function()
           alias: <thisLibrary>::@unit::package:test/a.dart::@typeAlias::F
       synthetic static set f= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _f @-1
@@ -51997,19 +59280,24 @@
         returnType: void
   parts
     package:test/a.dart
+      reference: <thisLibrary>::@unit::package:test/a.dart
       enclosingElement: <thisLibrary>
       classes
         class C @17
+          reference: <thisLibrary>::@unit::package:test/a.dart::@class::C
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           constructors
             synthetic @-1
+              reference: <thisLibrary>::@unit::package:test/a.dart::@class::C::@constructor::new
               enclosingElement: <thisLibrary>::@unit::package:test/a.dart::@class::C
       enums
         enum E @27
+          reference: <thisLibrary>::@unit::package:test/a.dart::@enum::E
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           supertype: Enum
           fields
             static const enumConstant v @31
+              reference: <thisLibrary>::@unit::package:test/a.dart::@enum::E::@field::v
               enclosingElement: <thisLibrary>::@unit::package:test/a.dart::@enum::E
               type: E
               shouldUseTypeForInitializerInference: false
@@ -52026,6 +59314,7 @@
                     rightParenthesis: ) @0
                   staticType: E
             synthetic static const values @-1
+              reference: <thisLibrary>::@unit::package:test/a.dart::@enum::E::@field::values
               enclosingElement: <thisLibrary>::@unit::package:test/a.dart::@enum::E
               type: List<E>
               constantInitializer
@@ -52040,16 +59329,20 @@
                   staticType: List<E>
           constructors
             synthetic const @-1
+              reference: <thisLibrary>::@unit::package:test/a.dart::@enum::E::@constructor::new
               enclosingElement: <thisLibrary>::@unit::package:test/a.dart::@enum::E
           accessors
             synthetic static get v @-1
+              reference: <thisLibrary>::@unit::package:test/a.dart::@enum::E::@getter::v
               enclosingElement: <thisLibrary>::@unit::package:test/a.dart::@enum::E
               returnType: E
             synthetic static get values @-1
+              reference: <thisLibrary>::@unit::package:test/a.dart::@enum::E::@getter::values
               enclosingElement: <thisLibrary>::@unit::package:test/a.dart::@enum::E
               returnType: List<E>
       typeAliases
         functionTypeAliasBased F @43
+          reference: <thisLibrary>::@unit::package:test/a.dart::@typeAlias::F
           aliasedType: dynamic Function()
           aliasedElement: GenericFunctionTypeElement
             returnType: dynamic
@@ -52064,20 +59357,26 @@
 library
   name: l
   nameOffset: 8
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @32
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     enums
       enum E @42
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @46
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -52094,6 +59393,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -52108,57 +59408,71 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
     typeAliases
       functionTypeAliasBased F @58
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: dynamic Function()
         aliasedElement: GenericFunctionTypeElement
           returnType: dynamic
   parts
     package:test/a.dart
+      reference: <thisLibrary>::@unit::package:test/a.dart
       enclosingElement: <thisLibrary>
       topLevelVariables
         static c @13
+          reference: <thisLibrary>::@unit::package:test/a.dart::@topLevelVariable::c
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           type: C
         static e @18
+          reference: <thisLibrary>::@unit::package:test/a.dart::@topLevelVariable::e
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           type: E
         static f @23
+          reference: <thisLibrary>::@unit::package:test/a.dart::@topLevelVariable::f
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           type: dynamic Function()
             alias: <thisLibrary>::<definingUnit>::@typeAlias::F
       accessors
         synthetic static get c @-1
+          reference: <thisLibrary>::@unit::package:test/a.dart::@getter::c
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           returnType: C
         synthetic static set c= @-1
+          reference: <thisLibrary>::@unit::package:test/a.dart::@setter::c
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           parameters
             requiredPositional _c @-1
               type: C
           returnType: void
         synthetic static get e @-1
+          reference: <thisLibrary>::@unit::package:test/a.dart::@getter::e
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           returnType: E
         synthetic static set e= @-1
+          reference: <thisLibrary>::@unit::package:test/a.dart::@setter::e
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           parameters
             requiredPositional _e @-1
               type: E
           returnType: void
         synthetic static get f @-1
+          reference: <thisLibrary>::@unit::package:test/a.dart::@getter::f
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           returnType: dynamic Function()
             alias: <thisLibrary>::<definingUnit>::@typeAlias::F
         synthetic static set f= @-1
+          reference: <thisLibrary>::@unit::package:test/a.dart::@setter::f
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           parameters
             requiredPositional _f @-1
@@ -52178,23 +59492,30 @@
 library
   name: l
   nameOffset: 8
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   parts
     package:test/a.dart
+      reference: <thisLibrary>::@unit::package:test/a.dart
       enclosingElement: <thisLibrary>
       classes
         class C @17
+          reference: <thisLibrary>::@unit::package:test/a.dart::@class::C
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           constructors
             synthetic @-1
+              reference: <thisLibrary>::@unit::package:test/a.dart::@class::C::@constructor::new
               enclosingElement: <thisLibrary>::@unit::package:test/a.dart::@class::C
       enums
         enum E @27
+          reference: <thisLibrary>::@unit::package:test/a.dart::@enum::E
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           supertype: Enum
           fields
             static const enumConstant v @31
+              reference: <thisLibrary>::@unit::package:test/a.dart::@enum::E::@field::v
               enclosingElement: <thisLibrary>::@unit::package:test/a.dart::@enum::E
               type: E
               shouldUseTypeForInitializerInference: false
@@ -52211,6 +59532,7 @@
                     rightParenthesis: ) @0
                   staticType: E
             synthetic static const values @-1
+              reference: <thisLibrary>::@unit::package:test/a.dart::@enum::E::@field::values
               enclosingElement: <thisLibrary>::@unit::package:test/a.dart::@enum::E
               type: List<E>
               constantInitializer
@@ -52225,56 +59547,70 @@
                   staticType: List<E>
           constructors
             synthetic const @-1
+              reference: <thisLibrary>::@unit::package:test/a.dart::@enum::E::@constructor::new
               enclosingElement: <thisLibrary>::@unit::package:test/a.dart::@enum::E
           accessors
             synthetic static get v @-1
+              reference: <thisLibrary>::@unit::package:test/a.dart::@enum::E::@getter::v
               enclosingElement: <thisLibrary>::@unit::package:test/a.dart::@enum::E
               returnType: E
             synthetic static get values @-1
+              reference: <thisLibrary>::@unit::package:test/a.dart::@enum::E::@getter::values
               enclosingElement: <thisLibrary>::@unit::package:test/a.dart::@enum::E
               returnType: List<E>
       typeAliases
         functionTypeAliasBased F @43
+          reference: <thisLibrary>::@unit::package:test/a.dart::@typeAlias::F
           aliasedType: dynamic Function()
           aliasedElement: GenericFunctionTypeElement
             returnType: dynamic
     package:test/b.dart
+      reference: <thisLibrary>::@unit::package:test/b.dart
       enclosingElement: <thisLibrary>
       topLevelVariables
         static c @13
+          reference: <thisLibrary>::@unit::package:test/b.dart::@topLevelVariable::c
           enclosingElement: <thisLibrary>::@unit::package:test/b.dart
           type: C
         static e @18
+          reference: <thisLibrary>::@unit::package:test/b.dart::@topLevelVariable::e
           enclosingElement: <thisLibrary>::@unit::package:test/b.dart
           type: E
         static f @23
+          reference: <thisLibrary>::@unit::package:test/b.dart::@topLevelVariable::f
           enclosingElement: <thisLibrary>::@unit::package:test/b.dart
           type: dynamic Function()
             alias: <thisLibrary>::@unit::package:test/a.dart::@typeAlias::F
       accessors
         synthetic static get c @-1
+          reference: <thisLibrary>::@unit::package:test/b.dart::@getter::c
           enclosingElement: <thisLibrary>::@unit::package:test/b.dart
           returnType: C
         synthetic static set c= @-1
+          reference: <thisLibrary>::@unit::package:test/b.dart::@setter::c
           enclosingElement: <thisLibrary>::@unit::package:test/b.dart
           parameters
             requiredPositional _c @-1
               type: C
           returnType: void
         synthetic static get e @-1
+          reference: <thisLibrary>::@unit::package:test/b.dart::@getter::e
           enclosingElement: <thisLibrary>::@unit::package:test/b.dart
           returnType: E
         synthetic static set e= @-1
+          reference: <thisLibrary>::@unit::package:test/b.dart::@setter::e
           enclosingElement: <thisLibrary>::@unit::package:test/b.dart
           parameters
             requiredPositional _e @-1
               type: E
           returnType: void
         synthetic static get f @-1
+          reference: <thisLibrary>::@unit::package:test/b.dart::@getter::f
           enclosingElement: <thisLibrary>::@unit::package:test/b.dart
           returnType: dynamic Function()
             alias: <thisLibrary>::@unit::package:test/a.dart::@typeAlias::F
         synthetic static set f= @-1
+          reference: <thisLibrary>::@unit::package:test/b.dart::@setter::f
           enclosingElement: <thisLibrary>::@unit::package:test/b.dart
           parameters
             requiredPositional _f @-1
@@ -52292,23 +59628,30 @@
 library
   name: l
   nameOffset: 8
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   parts
     package:test/a.dart
+      reference: <thisLibrary>::@unit::package:test/a.dart
       enclosingElement: <thisLibrary>
       classes
         class C @17
+          reference: <thisLibrary>::@unit::package:test/a.dart::@class::C
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           constructors
             synthetic @-1
+              reference: <thisLibrary>::@unit::package:test/a.dart::@class::C::@constructor::new
               enclosingElement: <thisLibrary>::@unit::package:test/a.dart::@class::C
       enums
         enum E @27
+          reference: <thisLibrary>::@unit::package:test/a.dart::@enum::E
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           supertype: Enum
           fields
             static const enumConstant v @31
+              reference: <thisLibrary>::@unit::package:test/a.dart::@enum::E::@field::v
               enclosingElement: <thisLibrary>::@unit::package:test/a.dart::@enum::E
               type: E
               shouldUseTypeForInitializerInference: false
@@ -52325,6 +59668,7 @@
                     rightParenthesis: ) @0
                   staticType: E
             synthetic static const values @-1
+              reference: <thisLibrary>::@unit::package:test/a.dart::@enum::E::@field::values
               enclosingElement: <thisLibrary>::@unit::package:test/a.dart::@enum::E
               type: List<E>
               constantInitializer
@@ -52339,54 +59683,67 @@
                   staticType: List<E>
           constructors
             synthetic const @-1
+              reference: <thisLibrary>::@unit::package:test/a.dart::@enum::E::@constructor::new
               enclosingElement: <thisLibrary>::@unit::package:test/a.dart::@enum::E
           accessors
             synthetic static get v @-1
+              reference: <thisLibrary>::@unit::package:test/a.dart::@enum::E::@getter::v
               enclosingElement: <thisLibrary>::@unit::package:test/a.dart::@enum::E
               returnType: E
             synthetic static get values @-1
+              reference: <thisLibrary>::@unit::package:test/a.dart::@enum::E::@getter::values
               enclosingElement: <thisLibrary>::@unit::package:test/a.dart::@enum::E
               returnType: List<E>
       typeAliases
         functionTypeAliasBased F @43
+          reference: <thisLibrary>::@unit::package:test/a.dart::@typeAlias::F
           aliasedType: dynamic Function()
           aliasedElement: GenericFunctionTypeElement
             returnType: dynamic
       topLevelVariables
         static c @50
+          reference: <thisLibrary>::@unit::package:test/a.dart::@topLevelVariable::c
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           type: C
         static e @55
+          reference: <thisLibrary>::@unit::package:test/a.dart::@topLevelVariable::e
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           type: E
         static f @60
+          reference: <thisLibrary>::@unit::package:test/a.dart::@topLevelVariable::f
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           type: dynamic Function()
             alias: <thisLibrary>::@unit::package:test/a.dart::@typeAlias::F
       accessors
         synthetic static get c @-1
+          reference: <thisLibrary>::@unit::package:test/a.dart::@getter::c
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           returnType: C
         synthetic static set c= @-1
+          reference: <thisLibrary>::@unit::package:test/a.dart::@setter::c
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           parameters
             requiredPositional _c @-1
               type: C
           returnType: void
         synthetic static get e @-1
+          reference: <thisLibrary>::@unit::package:test/a.dart::@getter::e
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           returnType: E
         synthetic static set e= @-1
+          reference: <thisLibrary>::@unit::package:test/a.dart::@setter::e
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           parameters
             requiredPositional _e @-1
               type: E
           returnType: void
         synthetic static get f @-1
+          reference: <thisLibrary>::@unit::package:test/a.dart::@getter::f
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           returnType: dynamic Function()
             alias: <thisLibrary>::@unit::package:test/a.dart::@typeAlias::F
         synthetic static set f= @-1
+          reference: <thisLibrary>::@unit::package:test/a.dart::@setter::f
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           parameters
             requiredPositional _f @-1
@@ -52400,23 +59757,30 @@
     var library = await buildLibrary('class C {} C c;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     topLevelVariables
       static c @13
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
@@ -52429,10 +59793,13 @@
     var library = await buildLibrary('class C<T, U> {} C<int, String> c;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -52441,16 +59808,20 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     topLevelVariables
       static c @32
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C<int, String>
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C<int, String>
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
@@ -52463,10 +59834,13 @@
     var library = await buildLibrary('class C<T, U> {} C c;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
@@ -52475,16 +59849,20 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     topLevelVariables
       static c @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C<dynamic, dynamic>
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C<dynamic, dynamic>
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
@@ -52497,14 +59875,18 @@
     var library = await buildLibrary('enum E { v } E e;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum E @5
+        reference: <thisLibrary>::<definingUnit>::@enum::E
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @9
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: E
             shouldUseTypeForInitializerInference: false
@@ -52521,6 +59903,7 @@
                   rightParenthesis: ) @0
                 staticType: E
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             type: List<E>
             constantInitializer
@@ -52535,23 +59918,29 @@
                 staticType: List<E>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: E
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::E::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::E
             returnType: List<E>
     topLevelVariables
       static e @15
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::e
         enclosingElement: <thisLibrary>::<definingUnit>
         type: E
     accessors
       synthetic static get e @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: E
       synthetic static set e= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _e @-1
@@ -52566,49 +59955,60 @@
     var library = await buildLibrary('import "a.dart"; C c; E e; F f;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static c @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
       static e @24
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::e
         enclosingElement: <thisLibrary>::<definingUnit>
         type: E
       static f @29
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic Function()
           alias: package:test/a.dart::<definingUnit>::@typeAlias::F
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
             type: C
         returnType: void
       synthetic static get e @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: E
       synthetic static set e= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _e @-1
             type: E
         returnType: void
       synthetic static get f @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic Function()
           alias: package:test/a.dart::<definingUnit>::@typeAlias::F
       synthetic static set f= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _f @-1
@@ -52625,49 +60025,60 @@
     var library = await buildLibrary('import "a.dart"; C c; E e; F f;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static c @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
       static e @24
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::e
         enclosingElement: <thisLibrary>::<definingUnit>
         type: E
       static f @29
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic Function()
           alias: package:test/b.dart::<definingUnit>::@typeAlias::F
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
             type: C
         returnType: void
       synthetic static get e @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: E
       synthetic static set e= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _e @-1
             type: E
         returnType: void
       synthetic static get f @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic Function()
           alias: package:test/b.dart::<definingUnit>::@typeAlias::F
       synthetic static set f= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _f @-1
@@ -52685,49 +60096,60 @@
     var library = await buildLibrary('import "a.dart"; C c; E e; F f;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static c @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
       static e @24
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::e
         enclosingElement: <thisLibrary>::<definingUnit>
         type: E
       static f @29
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic Function()
           alias: package:test/c.dart::<definingUnit>::@typeAlias::F
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
             type: C
         returnType: void
       synthetic static get e @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: E
       synthetic static set e= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _e @-1
             type: E
         returnType: void
       synthetic static get f @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic Function()
           alias: package:test/c.dart::<definingUnit>::@typeAlias::F
       synthetic static set f= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _f @-1
@@ -52745,49 +60167,60 @@
     var library = await buildLibrary('import "a/a.dart"; C c; E e; F f;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static c @21
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
       static e @26
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::e
         enclosingElement: <thisLibrary>::<definingUnit>
         type: E
       static f @31
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic Function()
           alias: package:test/a/c/c.dart::<definingUnit>::@typeAlias::F
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
             type: C
         returnType: void
       synthetic static get e @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: E
       synthetic static set e= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _e @-1
             type: E
         returnType: void
       synthetic static get f @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic Function()
           alias: package:test/a/c/c.dart::<definingUnit>::@typeAlias::F
       synthetic static set f= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _f @-1
@@ -52804,49 +60237,60 @@
     var library = await buildLibrary('import "a/a.dart"; C c; E e; F f;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static c @21
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
       static e @26
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::e
         enclosingElement: <thisLibrary>::<definingUnit>
         type: E
       static f @31
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic Function()
           alias: package:test/a/b/b.dart::<definingUnit>::@typeAlias::F
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
             type: C
         returnType: void
       synthetic static get e @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: E
       synthetic static set e= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _e @-1
             type: E
         returnType: void
       synthetic static get f @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic Function()
           alias: package:test/a/b/b.dart::<definingUnit>::@typeAlias::F
       synthetic static set f= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _f @-1
@@ -52863,49 +60307,60 @@
     var library = await buildLibrary('import "a.dart"; C c; E e; F f;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static c @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
       static e @24
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::e
         enclosingElement: <thisLibrary>::<definingUnit>
         type: E
       static f @29
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic Function()
           alias: package:test/a.dart::@unit::package:test/b.dart::@typeAlias::F
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
             type: C
         returnType: void
       synthetic static get e @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: E
       synthetic static set e= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _e @-1
             type: E
         returnType: void
       synthetic static get f @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic Function()
           alias: package:test/a.dart::@unit::package:test/b.dart::@typeAlias::F
       synthetic static set f= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _f @-1
@@ -52923,35 +60378,43 @@
     var library = await buildLibrary('import "a.dart"; C1 c1; C2 c2;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static c1 @20
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c1
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C1
       static c2 @27
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c2
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C2
     accessors
       synthetic static get c1 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c1
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C1
       synthetic static set c1= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c1
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c1 @-1
             type: C1
         returnType: void
       synthetic static get c2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C2
       synthetic static set c2= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c2 @-1
@@ -52967,49 +60430,60 @@
     var library = await buildLibrary('import "a/b.dart"; C c; E e; F f;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a/b.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a/b.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static c @21
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
       static e @26
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::e
         enclosingElement: <thisLibrary>::<definingUnit>
         type: E
       static f @31
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic Function()
           alias: package:test/a/b.dart::@unit::package:test/a/c.dart::@typeAlias::F
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
             type: C
         returnType: void
       synthetic static get e @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: E
       synthetic static set e= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _e @-1
             type: E
         returnType: void
       synthetic static get f @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic Function()
           alias: package:test/a/b.dart::@unit::package:test/a/c.dart::@typeAlias::F
       synthetic static set f= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _f @-1
@@ -53025,49 +60499,60 @@
     var library = await buildLibrary('import "a.dart"; C c; E e; F f;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static c @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
       static e @24
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::e
         enclosingElement: <thisLibrary>::<definingUnit>
         type: E
       static f @29
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic Function()
           alias: package:test/a.dart::<definingUnit>::@typeAlias::F
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
             type: C
         returnType: void
       synthetic static get e @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: E
       synthetic static set e= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::e
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _e @-1
             type: E
         returnType: void
       synthetic static get f @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic Function()
           alias: package:test/a.dart::<definingUnit>::@typeAlias::F
       synthetic static set f= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _f @-1
@@ -53081,24 +60566,30 @@
     var library = await buildLibrary('typedef F(); F f;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: dynamic Function()
         aliasedElement: GenericFunctionTypeElement
           returnType: dynamic
     topLevelVariables
       static f @15
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic Function()
           alias: <thisLibrary>::<definingUnit>::@typeAlias::F
     accessors
       synthetic static get f @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic Function()
           alias: <thisLibrary>::<definingUnit>::@typeAlias::F
       synthetic static set f= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _f @-1
@@ -53113,10 +60604,13 @@
         await buildLibrary('typedef U F<T, U>(T t); F<int, String> f;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @10
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           contravariant T @12
             defaultType: dynamic
@@ -53130,6 +60624,7 @@
           returnType: U
     topLevelVariables
       static f @39
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: String Function(int)
           alias: <thisLibrary>::<definingUnit>::@typeAlias::F
@@ -53138,6 +60633,7 @@
               String
     accessors
       synthetic static get f @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: String Function(int)
           alias: <thisLibrary>::<definingUnit>::@typeAlias::F
@@ -53145,6 +60641,7 @@
               int
               String
       synthetic static set f= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _f @-1
@@ -53161,10 +60658,13 @@
     var library = await buildLibrary('typedef U F<T, U>(T t); F f;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @10
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           contravariant T @12
             defaultType: dynamic
@@ -53178,6 +60678,7 @@
           returnType: U
     topLevelVariables
       static f @26
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::f
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic Function(dynamic)
           alias: <thisLibrary>::<definingUnit>::@typeAlias::F
@@ -53186,6 +60687,7 @@
               dynamic
     accessors
       synthetic static get f @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic Function(dynamic)
           alias: <thisLibrary>::<definingUnit>::@typeAlias::F
@@ -53193,6 +60695,7 @@
               dynamic
               dynamic
       synthetic static set f= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _f @-1
@@ -53209,17 +60712,22 @@
     var library = await buildLibrary('C c;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static c @2
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: InvalidType
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: InvalidType
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
@@ -53232,26 +60740,32 @@
     var library = await buildLibrary('import "dart:core" as core; core.C c;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:core as core @22
       enclosingElement: <thisLibrary>
   prefixes
     core @22
+      reference: <thisLibrary>::@prefix::core
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:core as core @22
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static c @35
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: InvalidType
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: InvalidType
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
@@ -53269,10 +60783,13 @@
     configuration.withFunctionTypeParameters = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         aliasedType: void Function({int p})
           parameters
             optionalNamed p @-1
@@ -53284,6 +60801,7 @@
           returnType: void
     functions
       f @42
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @46
@@ -53302,10 +60820,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @13
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: void Function(T Function<T, U>(U))
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -53327,10 +60848,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           contravariant T @10
             defaultType: dynamic
@@ -53350,10 +60874,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       F1 @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F1
         typeParameters
           contravariant T @11
             defaultType: dynamic
@@ -53364,6 +60891,7 @@
               type: T
           returnType: void
       F2 @42
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F2
         typeParameters
           contravariant T @45
             defaultType: dynamic
@@ -53382,10 +60910,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           covariant T @10
             defaultType: dynamic
@@ -53401,10 +60932,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           covariant T @10
             defaultType: dynamic
@@ -53421,10 +60955,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       F1 @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F1
         typeParameters
           covariant T @11
             defaultType: dynamic
@@ -53432,6 +60969,7 @@
         aliasedElement: GenericFunctionTypeElement
           returnType: T
       F2 @38
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F2
         typeParameters
           covariant T @41
             defaultType: dynamic
@@ -53451,10 +60989,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       F1 @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F1
         typeParameters
           contravariant T @11
             defaultType: dynamic
@@ -53465,6 +61006,7 @@
               type: T
           returnType: void
       F2 @42
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F2
         typeParameters
           covariant T @45
             defaultType: dynamic
@@ -53487,16 +61029,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     typeAliases
       F @19
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           unrelated T @21
             defaultType: dynamic
@@ -53516,14 +61063,18 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: void Function()
         aliasedElement: GenericFunctionTypeElement
           returnType: void
       G @37
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::G
         typeParameters
           unrelated T @39
             defaultType: dynamic
@@ -53543,10 +61094,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           invariant T @10
             defaultType: dynamic
@@ -53566,10 +61120,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       F1 @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F1
         typeParameters
           covariant T @11
             defaultType: dynamic
@@ -53577,6 +61134,7 @@
         aliasedElement: GenericFunctionTypeElement
           returnType: T
       F2 @38
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F2
         typeParameters
           invariant T @41
             defaultType: dynamic
@@ -53598,10 +61156,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           unrelated T @10
             defaultType: dynamic
@@ -53620,10 +61181,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         typeParameters
           contravariant T @10
             defaultType: dynamic
@@ -53638,10 +61202,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         typeParameters
           contravariant T @10
             defaultType: dynamic
@@ -53652,6 +61219,7 @@
               type: T
           returnType: void
       B @41
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::B
         typeParameters
           contravariant T @43
             defaultType: dynamic
@@ -53665,10 +61233,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         typeParameters
           covariant T @10
             defaultType: dynamic
@@ -53683,15 +61254,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         typeParameters
           covariant T @10
             defaultType: dynamic
         aliasedType: Map<int, T>
       B @36
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::B
         typeParameters
           covariant T @38
             defaultType: dynamic
@@ -53705,10 +61280,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         typeParameters
           contravariant T @10
             defaultType: dynamic
@@ -53723,15 +61301,19 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         typeParameters
           contravariant T @10
             defaultType: dynamic
         aliasedType: (void Function(T), int)
       B @48
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::B
         typeParameters
           contravariant T @50
             defaultType: dynamic
@@ -53745,10 +61327,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         typeParameters
           covariant T @10
             defaultType: dynamic
@@ -53762,10 +61347,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         typeParameters
           invariant T @10
             defaultType: dynamic
@@ -53779,10 +61367,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         typeParameters
           unrelated T @10
             defaultType: dynamic
@@ -53795,10 +61386,13 @@
         'typedef F<T> = int Function<S>(List<S> list, num Function<A>(A), T);');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           contravariant T @10
             defaultType: dynamic
@@ -53826,13 +61420,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @43
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           f @58
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int Function<T>(T)
               alias: <thisLibrary>::<definingUnit>::@typeAlias::Foo
@@ -53840,15 +61438,18 @@
                   int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int Function<T>(T)
               alias: <thisLibrary>::<definingUnit>::@typeAlias::Foo
                 typeArguments
                   int
           synthetic set f= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _f @-1
@@ -53859,6 +61460,7 @@
             returnType: void
     typeAliases
       Foo @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::Foo
         typeParameters
           covariant S @12
             defaultType: dynamic
@@ -53882,10 +61484,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @38
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @40
@@ -53893,9 +61498,11 @@
             defaultType: C<dynamic>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     typeAliases
       notSimplyBounded F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: void Function(C<C<dynamic>>)
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -53914,10 +61521,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @36
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @38
@@ -53925,9 +61535,11 @@
             defaultType: C<dynamic>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     typeAliases
       notSimplyBounded F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: void Function(C<C<dynamic>>)
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -53946,10 +61558,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @32
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @34
@@ -53957,9 +61572,11 @@
             defaultType: C<dynamic>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     typeAliases
       notSimplyBounded F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: C<C<dynamic>> Function()
         aliasedElement: GenericFunctionTypeElement
           returnType: C<C<dynamic>>
@@ -53971,10 +61588,13 @@
         await buildLibrary('typedef F<T extends U, U> = U Function(T t);');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       notSimplyBounded F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           contravariant T @10
             bound: U
@@ -53999,10 +61619,13 @@
 typedef F();''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @68
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         documentationComment: /**\n * Docs\n */
         aliasedType: dynamic Function()
         aliasedElement: GenericFunctionTypeElement
@@ -54019,10 +61642,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @27
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @29
@@ -54030,9 +61656,11 @@
             defaultType: C<dynamic>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     typeAliases
       functionTypeAliasBased notSimplyBounded F @13
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: void Function(C<C<dynamic>>)
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -54051,10 +61679,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       notSimplyBounded class C @21
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @23
@@ -54062,9 +61693,11 @@
             defaultType: C<dynamic>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     typeAliases
       functionTypeAliasBased notSimplyBounded F @10
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: C<C<dynamic>> Function()
         aliasedElement: GenericFunctionTypeElement
           returnType: C<C<dynamic>>
@@ -54077,10 +61710,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased notSimplyBounded F @13
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           unrelated T @15
             bound: dynamic
@@ -54097,10 +61733,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @13
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: void Function()
         aliasedElement: GenericFunctionTypeElement
           returnType: void
@@ -54111,10 +61750,13 @@
     var library = await buildLibrary('typedef void F<T>();');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @13
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           unrelated T @15
             defaultType: dynamic
@@ -54141,10 +61783,13 @@
     var library = await buildLibrary('typedef F(g(x, y));');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: dynamic Function(dynamic Function(dynamic, dynamic))
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -54163,10 +61808,13 @@
     var library = await buildLibrary('typedef F<A, B>(A g(B x));');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           contravariant A @10
             defaultType: dynamic
@@ -54188,10 +61836,13 @@
     var library = await buildLibrary('typedef F(int g());');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: dynamic Function(int Function())
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -54205,10 +61856,13 @@
     var library = await buildLibrary('typedef F(int i);');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: dynamic Function(int)
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -54222,10 +61876,13 @@
     var library = await buildLibrary('typedef F<T>(T t);');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           contravariant T @10
             defaultType: dynamic
@@ -54242,10 +61899,13 @@
     var library = await buildLibrary('typedef F(x, y);');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: dynamic Function(dynamic, dynamic)
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -54261,10 +61921,13 @@
     var library = await buildLibrary('typedef F({y, z, x});');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: dynamic Function({dynamic x, dynamic y, dynamic z})
         aliasedElement: GenericFunctionTypeElement
           parameters
@@ -54282,10 +61945,13 @@
     var library = await buildLibrary('typedef int F();');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @12
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: int Function()
         aliasedElement: GenericFunctionTypeElement
           returnType: int
@@ -54296,10 +61962,13 @@
     var library = await buildLibrary('typedef T F<T>();');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @10
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           covariant T @12
             defaultType: dynamic
@@ -54313,10 +61982,13 @@
     var library = await buildLibrary('typedef F();');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: dynamic Function()
         aliasedElement: GenericFunctionTypeElement
           returnType: dynamic
@@ -54327,10 +61999,13 @@
     var library = await buildLibrary('typedef void F();');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @13
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: void Function()
         aliasedElement: GenericFunctionTypeElement
           returnType: void
@@ -54341,10 +62016,13 @@
     var library = await buildLibrary('typedef U F<T, U>(T t);');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased F @10
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           contravariant T @12
             defaultType: dynamic
@@ -54364,16 +62042,21 @@
         'typedef U F<T extends Object, U extends D>(T t); class D {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class D @55
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
     typeAliases
       functionTypeAliasBased F @10
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           contravariant T @12
             bound: Object
@@ -54395,10 +62078,13 @@
     // Typedefs cannot reference themselves.
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased notSimplyBounded F @13
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           unrelated T @15
             bound: dynamic
@@ -54414,10 +62100,13 @@
     // Typedefs cannot reference themselves.
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased notSimplyBounded F @13
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           unrelated T @15
             bound: List<dynamic>
@@ -54432,10 +62121,13 @@
     var library = await buildLibrary('typedef U F<T extends List<U>, U>(T t);');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased notSimplyBounded F @10
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           contravariant T @12
             bound: List<U>
@@ -54455,10 +62147,13 @@
     var library = await buildLibrary('typedef U F<T extends U, U>(T t);');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       functionTypeAliasBased notSimplyBounded F @10
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           contravariant T @12
             bound: U
@@ -54500,14 +62195,18 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A1 @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A1
         aliasedType: void Function()
         aliasedElement: GenericFunctionTypeElement
           returnType: void
       A2 @38
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A2
         typeParameters
           covariant R @41
             defaultType: dynamic
@@ -54516,6 +62215,7 @@
           returnType: R
     functions
       f1 @65
+        reference: <thisLibrary>::<definingUnit>::@function::f1
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @71
@@ -54523,6 +62223,7 @@
               alias: <thisLibrary>::<definingUnit>::@typeAlias::A1
         returnType: void
       f2 @82
+        reference: <thisLibrary>::<definingUnit>::@function::f2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @93
@@ -54544,12 +62245,16 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A1 @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A1
         aliasedType: List<int>
       A2 @32
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A2
         typeParameters
           covariant T @35
             defaultType: dynamic
@@ -54558,6 +62263,7 @@
         aliasedType: Map<T, U>
     functions
       f1 @59
+        reference: <thisLibrary>::<definingUnit>::@function::f1
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @65
@@ -54565,6 +62271,7 @@
               alias: <thisLibrary>::<definingUnit>::@typeAlias::A1
         returnType: void
       f2 @76
+        reference: <thisLibrary>::<definingUnit>::@function::f2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @95
@@ -54605,10 +62312,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         typeParameters
           covariant T @10
             defaultType: dynamic
@@ -54617,6 +62327,7 @@
         aliasedType: (T, U)
     functions
       f @31
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @48
@@ -54637,16 +62348,20 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         typeParameters
           covariant T @10
             defaultType: dynamic
         aliasedType: T
     functions
       f @23
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant U @25
@@ -54685,10 +62400,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @32
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @34
@@ -54697,8 +62415,10 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @49
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A<int, String>
@@ -54707,9 +62427,11 @@
                 String
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
     typeAliases
       X @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::X
         typeParameters
           covariant T @10
             defaultType: dynamic
@@ -54727,37 +62449,48 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @28
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @30
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @42
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
       class C @53
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       class D @64
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           B
           C
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
     typeAliases
       X @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::X
         typeParameters
           covariant T @10
             defaultType: dynamic
@@ -54775,28 +62508,37 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @28
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @30
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @42
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
       class C @53
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
       class D @64
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           B
@@ -54807,9 +62549,11 @@
           C
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
     typeAliases
       X @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::X
         typeParameters
           covariant T @10
             defaultType: dynamic
@@ -54824,16 +62568,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @25
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     typeAliases
       X @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::X
         aliasedType: Never
 ''');
   }
@@ -54845,16 +62594,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @24
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     typeAliases
       X @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::X
         aliasedType: Null
 ''');
   }
@@ -54868,20 +62622,27 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @24
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @35
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
       class C @46
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant U @48
@@ -54891,9 +62652,11 @@
           B
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     typeAliases
       X @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::X
         typeParameters
           covariant T @10
             defaultType: dynamic
@@ -54910,29 +62673,38 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @24
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @35
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
       class C @46
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
           B
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     typeAliases
       X @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::X
         aliasedType: void
 ''');
   }
@@ -54945,18 +62717,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @26
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @28
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @40
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Object
         mixins
@@ -54964,9 +62741,11 @@
             alias: <thisLibrary>::<definingUnit>::@typeAlias::X
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
     typeAliases
       X @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::X
         aliasedType: A<int>
 ''');
   }
@@ -54981,18 +62760,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @27
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @29
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @65
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Object
         mixins
@@ -55000,18 +62784,22 @@
           M2
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
     mixins
       mixin M1 @41
+        reference: <thisLibrary>::<definingUnit>::@mixin::M1
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
       mixin M2 @53
+        reference: <thisLibrary>::<definingUnit>::@mixin::M2
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
     typeAliases
       X @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::X
         aliasedType: A<int>?
 ''');
   }
@@ -55026,18 +62814,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @27
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @29
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @65
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Object
         mixins
@@ -55047,18 +62840,22 @@
           M2
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
     mixins
       mixin M1 @41
+        reference: <thisLibrary>::<definingUnit>::@mixin::M1
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
       mixin M2 @53
+        reference: <thisLibrary>::<definingUnit>::@mixin::M2
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
     typeAliases
       X @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::X
         aliasedType: A<int?>
 ''');
   }
@@ -55070,16 +62867,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @25
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     typeAliases
       X @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::X
         aliasedType: Never
 ''');
   }
@@ -55092,29 +62894,36 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @26
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @28
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @40
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A<int>
           alias: <thisLibrary>::<definingUnit>::@typeAlias::X
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
               substitution: {T: int}
     typeAliases
       X @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::X
         aliasedType: A<int>
 ''');
   }
@@ -55127,18 +62936,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @24
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @26
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class B @38
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A<int>
           alias: <thisLibrary>::<definingUnit>::@typeAlias::X
@@ -55146,12 +62960,14 @@
               A<int>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
               substitution: {T: int}
     typeAliases
       X @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::X
         typeParameters
           covariant T @10
             defaultType: dynamic
@@ -55166,16 +62982,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @24
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     typeAliases
       X @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::X
         aliasedType: Null
 ''');
   }
@@ -55188,24 +63009,31 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @27
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @29
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class D @41
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
     typeAliases
       X @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::X
         aliasedType: A<int>?
 ''');
   }
@@ -55218,29 +63046,36 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @27
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @29
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
       class D @41
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A<int?>
           alias: <thisLibrary>::<definingUnit>::@typeAlias::X
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
               substitution: {T: int?}
     typeAliases
       X @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::X
         aliasedType: A<int?>
 ''');
   }
@@ -55252,16 +63087,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @25
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     typeAliases
       X @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::X
         aliasedType: Never
 ''');
   }
@@ -55273,16 +63113,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @24
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     typeAliases
       X @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::X
         aliasedType: Null
 ''');
   }
@@ -55294,13 +63139,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         aliasedType: dynamic
     functions
       f @26
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @30
@@ -55321,13 +63170,17 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @24
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         aliasedType: dynamic Function()
     functions
       f @38
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @42
@@ -55344,13 +63197,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         aliasedType: int
     functions
       f @22
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @26
@@ -55367,13 +63224,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         aliasedType: int?
     functions
       f @23
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @27
@@ -55390,16 +63251,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         typeParameters
           covariant T @10
             defaultType: dynamic
         aliasedType: Map<int, T>
     functions
       f @33
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @45
@@ -55418,13 +63283,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         aliasedType: Never
     functions
       f @24
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @28
@@ -55440,13 +63309,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         aliasedType: Never?
     functions
       f @25
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @29
@@ -55463,22 +63336,27 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         typeParameters
           covariant T @10
             defaultType: dynamic
         aliasedType: T
     functions
       f1 @23
+        reference: <thisLibrary>::<definingUnit>::@function::f1
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @28
             type: dynamic
         returnType: void
       f2 @39
+        reference: <thisLibrary>::<definingUnit>::@function::f2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @49
@@ -55498,22 +63376,27 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         typeParameters
           covariant T @10
             defaultType: dynamic
         aliasedType: T?
     functions
       f1 @24
+        reference: <thisLibrary>::<definingUnit>::@function::f1
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @29
             type: dynamic
         returnType: void
       f2 @40
+        reference: <thisLibrary>::<definingUnit>::@function::f2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @50
@@ -55532,13 +63415,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         aliasedType: void
     functions
       f @23
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @27
@@ -55554,10 +63441,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     typeAliases
       notSimplyBounded F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         aliasedType: (dynamic, int) Function()
         aliasedElement: GenericFunctionTypeElement
           returnType: (dynamic, int)
@@ -55568,13 +63458,17 @@
     var library = await buildLibrary('f() {} g() {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       f @0
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       g @7
+        reference: <thisLibrary>::<definingUnit>::@function::g
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -55587,17 +63481,22 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static x @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
     accessors
       static get x @8
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       static set x= @25
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional value @31
@@ -55613,20 +63512,25 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static x @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
     accessors
       static set x= @9
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional value @15
             type: int
         returnType: void
       static get x @33
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -55640,10 +63544,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static foo @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
@@ -55651,17 +63558,20 @@
         getter: getter_0
         setter: setter_0
       synthetic static foo @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         id: variable_1
         getter: getter_1
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo::@def::0
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
         id: getter_0
         variable: variable_0
       synthetic static set foo= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _foo @-1
@@ -55670,6 +63580,7 @@
         id: setter_0
         variable: variable_0
       static get foo @21
+        reference: <thisLibrary>::<definingUnit>::@getter::foo::@def::1
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
         id: getter_1
@@ -55685,10 +63596,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static foo @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
@@ -55696,17 +63610,20 @@
         getter: getter_0
         setter: setter_0
       synthetic static foo @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         id: variable_1
         setter: setter_1
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
         id: getter_0
         variable: variable_0
       synthetic static set foo= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::foo::@def::0
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _foo @-1
@@ -55715,6 +63632,7 @@
         id: setter_0
         variable: variable_0
       static set foo= @17
+        reference: <thisLibrary>::<definingUnit>::@setter::foo::@def::1
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _ @25
@@ -55733,10 +63651,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static final foo @10
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
@@ -55745,11 +63666,13 @@
         setter: setter_0
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
         id: getter_0
         variable: variable_0
       static set foo= @23
+        reference: <thisLibrary>::<definingUnit>::@setter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional newValue @31
@@ -55771,18 +63694,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @18
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _ @20
                 type: dynamic
       class C @43
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -55801,6 +63729,7 @@
             element: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -55816,18 +63745,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           const @18
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _ @20
                 type: dynamic
       class C @42
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -55846,6 +63780,7 @@
             element: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -55854,10 +63789,13 @@
     var library = await buildLibrary('@foo.bar() class C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @17
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -55880,6 +63818,7 @@
             element: <null>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -55888,10 +63827,13 @@
     var library = await buildLibrary('@String.foo() class C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @20
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -55914,6 +63856,7 @@
             element: <null>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -55922,10 +63865,13 @@
     var library = await buildLibrary('@foo.bar class C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @15
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -55945,6 +63891,7 @@
             element: <null>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -55954,19 +63901,23 @@
         await buildLibrary('import "dart:async" as foo; @foo.bar class C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async as foo @23
       enclosingElement: <thisLibrary>
   prefixes
     foo @23
+      reference: <thisLibrary>::@prefix::foo
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async as foo @23
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @43
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -55986,6 +63937,7 @@
             element: <null>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -55994,10 +63946,13 @@
     var library = await buildLibrary('@foo.bar.baz() class C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @21
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -56025,6 +63980,7 @@
             element: <null>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -56034,19 +63990,23 @@
         'import "dart:async" as foo; @foo.bar.baz() class C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async as foo @23
       enclosingElement: <thisLibrary>
   prefixes
     foo @23
+      reference: <thisLibrary>::@prefix::foo
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async as foo @23
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @49
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -56074,6 +64034,7 @@
             element: <null>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -56083,19 +64044,23 @@
         'import "dart:async" as foo; @foo.Future.bar() class C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async as foo @23
       enclosingElement: <thisLibrary>
   prefixes
     foo @23
+      reference: <thisLibrary>::@prefix::foo
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async as foo @23
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @52
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -56123,6 +64088,7 @@
             element: <null>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -56131,10 +64097,13 @@
     var library = await buildLibrary('@foo.bar() class C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @17
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -56157,6 +64126,7 @@
             element: <null>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -56166,19 +64136,23 @@
         await buildLibrary('import "dart:async" as foo; @foo.bar() class C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async as foo @23
       enclosingElement: <thisLibrary>
   prefixes
     foo @23
+      reference: <thisLibrary>::@prefix::foo
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async as foo @23
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @45
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -56201,6 +64175,7 @@
             element: <null>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -56209,10 +64184,13 @@
     var library = await buildLibrary('@foo class C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @11
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -56224,6 +64202,7 @@
             element: <null>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -56240,12 +64219,14 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
     package:test/b.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
@@ -56254,6 +64235,7 @@
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class C @44
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -56265,6 +64247,7 @@
             element: <null>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -56273,10 +64256,13 @@
     var library = await buildLibrary('@foo() class C {}');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @13
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -56291,6 +64277,7 @@
             element: <null>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
 ''');
   }
@@ -56299,10 +64286,12 @@
     var library = await buildLibrary("export 'foo.dart';");
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   exports
     package:test/foo.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryExports
       package:test/foo.dart
@@ -56318,10 +64307,12 @@
     expect(importedLibrary.exportNamespace, isNotNull);
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/foo.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/foo.dart
@@ -56339,43 +64330,54 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           f @20
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: void
     topLevelVariables
       static c @36
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C<int>
       static v @43
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: void Function()
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C<int>
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
             type: C<int>
         returnType: void
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: void Function()
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -56388,18 +64390,23 @@
     var library = await buildLibrary('int x = 0;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static x @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -56412,10 +64419,13 @@
     var library = await buildLibrary('const int i = 0;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const i @10
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::i
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
@@ -56425,6 +64435,7 @@
             staticType: int
     accessors
       synthetic static get i @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::i
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -56434,10 +64445,13 @@
     var library = await buildLibrary('late const int i = 0;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static late const i @15
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::i
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
@@ -56447,6 +64461,7 @@
             staticType: int
     accessors
       synthetic static get i @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::i
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -56461,18 +64476,23 @@
 var x;''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static x @64
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /**\n * Docs\n */
         type: dynamic
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -56485,15 +64505,19 @@
     var library = await buildLibrary('final int x = 0;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static final x @10
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -56512,25 +64536,32 @@
 library
   name: my.lib
   nameOffset: 8
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static x @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
     accessors
       static get x @39
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
   parts
     package:test/a.dart
+      reference: <thisLibrary>::@unit::package:test/a.dart
       enclosingElement: <thisLibrary>
       topLevelVariables
         synthetic static x @-1
+          reference: <thisLibrary>::@unit::package:test/a.dart::@topLevelVariable::x
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           type: int
       accessors
         static set x= @25
+          reference: <thisLibrary>::@unit::package:test/a.dart::@setter::x
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           parameters
             requiredPositional _ @31
@@ -56553,14 +64584,18 @@
 library
   name: my.lib
   nameOffset: 8
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static x @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
     accessors
       static set x= @40
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _ @46
@@ -56568,13 +64603,16 @@
         returnType: void
   parts
     package:test/a.dart
+      reference: <thisLibrary>::@unit::package:test/a.dart
       enclosingElement: <thisLibrary>
       topLevelVariables
         synthetic static x @-1
+          reference: <thisLibrary>::@unit::package:test/a.dart::@topLevelVariable::x
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           type: int
       accessors
         static get x @24
+          reference: <thisLibrary>::@unit::package:test/a.dart::@getter::x
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           returnType: int
 ''');
@@ -56590,27 +64628,35 @@
 library
   name: my.lib
   nameOffset: 8
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   parts
     package:test/a.dart
+      reference: <thisLibrary>::@unit::package:test/a.dart
       enclosingElement: <thisLibrary>
       topLevelVariables
         synthetic static x @-1
+          reference: <thisLibrary>::@unit::package:test/a.dart::@topLevelVariable::x
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           type: int
       accessors
         static get x @24
+          reference: <thisLibrary>::@unit::package:test/a.dart::@getter::x
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           returnType: int
     package:test/b.dart
+      reference: <thisLibrary>::@unit::package:test/b.dart
       enclosingElement: <thisLibrary>
       topLevelVariables
         synthetic static x @-1
+          reference: <thisLibrary>::@unit::package:test/b.dart::@topLevelVariable::x
           enclosingElement: <thisLibrary>::@unit::package:test/b.dart
           type: int
       accessors
         static set x= @25
+          reference: <thisLibrary>::@unit::package:test/b.dart::@setter::x
           enclosingElement: <thisLibrary>::@unit::package:test/b.dart
           parameters
             requiredPositional _ @31
@@ -56631,24 +64677,34 @@
     expect(variable.isFinal, isFalse);
     expect(variable.getter, same(getter));
     _assertTypeStr(variable.type, 'int');
-    expect(variable, same(_elementOfDefiningUnit(library, ['@variable', 'x'])));
+    expect(
+      variable,
+      same(
+        _elementOfDefiningUnit(library, ['@topLevelVariable', 'x']),
+      ),
+    );
   }
 
   test_variable_implicit_type() async {
     var library = await buildLibrary('var x;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static x @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -56661,18 +64717,23 @@
     var library = await buildLibrary('int v = 0;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static v @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -56685,15 +64746,19 @@
     var library = await buildLibrary('final int v = 0;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static final v @10
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -56703,15 +64768,19 @@
     var library = await buildLibrary('final v = 0;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static final v @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -56723,10 +64792,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const x @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: (int, bool)
         shouldUseTypeForInitializerInference: false
@@ -56744,6 +64816,7 @@
             staticType: (int, bool)
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: (int, bool)
 ''');
@@ -56759,32 +64832,41 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     extensions
       E @21
+        reference: <thisLibrary>::<definingUnit>::@extension::E
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: A
         methods
           static f @43
+            reference: <thisLibrary>::<definingUnit>::@extension::E::@method::f
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::E
             returnType: int
     topLevelVariables
       static x @59
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -56797,18 +64879,23 @@
     var library = await buildLibrary('var v = 0;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static v @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -56821,18 +64908,23 @@
     var library = await buildLibrary('late int x = 0;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static late x @9
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -56845,17 +64937,22 @@
     var library = await buildLibrary('late final int x;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static late final x @15
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -56868,15 +64965,19 @@
     var library = await buildLibrary('late final int x = 0;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static late final x @15
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -56886,10 +64987,13 @@
     var library = await buildLibrary('const i = 0;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const i @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::i
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -56899,6 +65003,7 @@
             staticType: int
     accessors
       synthetic static get i @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::i
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -56909,21 +65014,25 @@
     var library = await buildLibrary('import "a.dart"; final b = a / 2;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static final b @23
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
 ''');
@@ -56937,27 +65046,34 @@
 library
   name: lib
   nameOffset: 8
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static final b @34
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
   parts
     package:test/a.dart
+      reference: <thisLibrary>::@unit::package:test/a.dart
       enclosingElement: <thisLibrary>
       topLevelVariables
         static final a @19
+          reference: <thisLibrary>::@unit::package:test/a.dart::@topLevelVariable::a
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           type: int
           shouldUseTypeForInitializerInference: false
       accessors
         synthetic static get a @-1
+          reference: <thisLibrary>::@unit::package:test/a.dart::@getter::a
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           returnType: int
 ''');
@@ -56967,15 +65083,19 @@
     var library = await buildLibrary('final i = 0;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static final i @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::i
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get i @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::i
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -56988,21 +65108,25 @@
     var library = await buildLibrary('import "b.dart"; final x = f();');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/b.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/b.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static final x @23
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
 ''');
@@ -57018,30 +65142,38 @@
 library
   name: my.lib
   nameOffset: 8
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   parts
     package:test/a.dart
+      reference: <thisLibrary>::@unit::package:test/a.dart
       enclosingElement: <thisLibrary>
       topLevelVariables
         synthetic static x @-1
+          reference: <thisLibrary>::@unit::package:test/a.dart::@topLevelVariable::x
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           type: int
       accessors
         static set x= @25
+          reference: <thisLibrary>::@unit::package:test/a.dart::@setter::x
           enclosingElement: <thisLibrary>::@unit::package:test/a.dart
           parameters
             requiredPositional _ @31
               type: int
           returnType: void
     package:test/b.dart
+      reference: <thisLibrary>::@unit::package:test/b.dart
       enclosingElement: <thisLibrary>
       topLevelVariables
         synthetic static x @-1
+          reference: <thisLibrary>::@unit::package:test/b.dart::@topLevelVariable::x
           enclosingElement: <thisLibrary>::@unit::package:test/b.dart
           type: int
       accessors
         static get x @24
+          reference: <thisLibrary>::@unit::package:test/b.dart::@getter::x
           enclosingElement: <thisLibrary>::@unit::package:test/b.dart
           returnType: int
 ''');
@@ -57051,18 +65183,23 @@
     var library = await buildLibrary('var v = 0;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static v @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -57078,18 +65215,23 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static a @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Never
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Never
       synthetic static set a= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _a @-1
@@ -57105,17 +65247,22 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static a @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set a= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _a @-1
@@ -57133,19 +65280,24 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           const @21
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     topLevelVariables
       static const a @41
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: A<int>
         shouldUseTypeForInitializerInference: true
@@ -57165,6 +65317,7 @@
             staticType: A<int>
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A<int>
 ''');
@@ -57174,29 +65327,37 @@
     var library = await buildLibrary('int i; int j;');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static i @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::i
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
       static j @11
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::j
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
     accessors
       synthetic static get i @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::i
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set i= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::i
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _i @-1
             type: int
         returnType: void
       synthetic static get j @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::j
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set j= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::j
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _j @-1
@@ -57287,9 +65448,7 @@
 import augment 'a.dart';
 ''');
 
-    configuration
-      ..withConstantInitializers = false
-      ..withReferences = true;
+    configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -57410,29 +65569,37 @@
       ..withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @57
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a1.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @63
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
         augmented
@@ -57448,52 +65615,70 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a1.dart
+      reference: <thisLibrary>::@augmentation::package:test/a1.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a1.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a1.dart
         enums
           augment enum A @96
+            reference: <thisLibrary>::@augmentation::package:test/a1.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a1.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             augmentation: <thisLibrary>::@augmentation::package:test/a11.dart::@enumAugmentation::A
       augmentationImports
         package:test/a11.dart
+          reference: <thisLibrary>::@augmentation::package:test/a11.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/a11.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/a11.dart
             enums
               augment enum A @40
+                reference: <thisLibrary>::@augmentation::package:test/a11.dart::@enumAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a11.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a1.dart::@enumAugmentation::A
                 augmentation: <thisLibrary>::@augmentation::package:test/a12.dart::@enumAugmentation::A
         package:test/a12.dart
+          reference: <thisLibrary>::@augmentation::package:test/a12.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/a12.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/a12.dart
             enums
               augment enum A @40
+                reference: <thisLibrary>::@augmentation::package:test/a12.dart::@enumAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a12.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a11.dart::@enumAugmentation::A
                 augmentation: <thisLibrary>::@augmentation::package:test/a2.dart::@enumAugmentation::A
     package:test/a2.dart
+      reference: <thisLibrary>::@augmentation::package:test/a2.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a2.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a2.dart
         enums
           augment enum A @96
+            reference: <thisLibrary>::@augmentation::package:test/a2.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a2.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a12.dart::@enumAugmentation::A
             augmentation: <thisLibrary>::@augmentation::package:test/a21.dart::@enumAugmentation::A
       augmentationImports
         package:test/a21.dart
+          reference: <thisLibrary>::@augmentation::package:test/a21.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/a21.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/a21.dart
             enums
               augment enum A @40
+                reference: <thisLibrary>::@augmentation::package:test/a21.dart::@enumAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a21.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a2.dart::@enumAugmentation::A
                 augmentation: <thisLibrary>::@augmentation::package:test/a22.dart::@enumAugmentation::A
         package:test/a22.dart
+          reference: <thisLibrary>::@augmentation::package:test/a22.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/a22.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/a22.dart
             enums
               augment enum A @40
+                reference: <thisLibrary>::@augmentation::package:test/a22.dart::@enumAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a22.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a21.dart::@enumAugmentation::A
   exportedReferences
@@ -57525,9 +65710,7 @@
 import augment 'a.dart';
 ''');
 
-    configuration
-      ..withConstantInitializers = false
-      ..withReferences = true;
+    configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -57644,18 +65827,24 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @67
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
             fields
               synthetic static const values @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@field::values
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 type: List<A>
                 constantInitializer
@@ -57665,13 +65854,16 @@
                     staticType: List<A>
             constructors
               synthetic const @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             accessors
               synthetic static get values @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@getter::values
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 returnType: List<A>
             methods
               foo1 @79
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@method::foo1
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 returnType: void
             augmented
@@ -57686,14 +65878,18 @@
                 <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A::@method::foo2
       augmentationImports
         package:test/b.dart
+          reference: <thisLibrary>::@augmentation::package:test/b.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/b.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             enums
               augment enum A @39
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 methods
                   foo2 @51
+                    reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A::@method::foo2
                     enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
                     returnType: void
 ''');
@@ -57714,9 +65910,7 @@
 }
 ''');
 
-    configuration
-      ..withPropertyLinking = true
-      ..withReferences = true;
+    configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -57864,9 +66058,7 @@
 }
 ''');
 
-    configuration
-      ..withPropertyLinking = true
-      ..withReferences = true;
+    configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -58052,9 +66244,7 @@
 }
 ''');
 
-    configuration
-      ..withPropertyLinking = true
-      ..withReferences = true;
+    configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -58214,9 +66404,7 @@
 }
 ''');
 
-    configuration
-      ..withPropertyLinking = true
-      ..withReferences = true;
+    configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -58408,9 +66596,7 @@
 }
 ''');
 
-    configuration
-      ..withPropertyLinking = true
-      ..withReferences = true;
+    configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -58586,8 +66772,7 @@
 
     configuration
       ..withConstructors = false
-      ..withConstantInitializers = false
-      ..withReferences = true;
+      ..withConstantInitializers = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -58687,26 +66872,33 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
         augmented
@@ -58722,14 +66914,18 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             constructors
               const named @57
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@constructor::named
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 periodOffset: 56
                 nameEnd: 62
@@ -58754,10 +66950,13 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T1 @32
@@ -58766,17 +66965,21 @@
         supertype: Enum
         fields
           static const enumConstant v @40
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A<int>
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A<dynamic>>
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A<int>
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A<dynamic>>
         augmented
@@ -58794,10 +66997,13 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @44
@@ -58805,6 +67011,7 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             constructors
               const named @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@constructor::named
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 periodOffset: 60
                 nameEnd: 66
@@ -58833,29 +67040,37 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
         constructors
           const @47
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
         augmented
@@ -58872,14 +67087,18 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             constructors
               const named @57
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@constructor::named
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 periodOffset: 56
                 nameEnd: 62
@@ -58904,26 +67123,33 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
         augmented
@@ -58939,14 +67165,18 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             constructors
               const @55
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
 ''');
   }
@@ -58970,31 +67200,39 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
         constructors
           const named @49
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             periodOffset: 48
             nameEnd: 54
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
         augmented
@@ -59011,14 +67249,18 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             constructors
               const @55
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
 ''');
   }
@@ -59042,32 +67284,41 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
           final f @54
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: int
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: int
         augmented
@@ -59085,14 +67336,18 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             constructors
               const named @57
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@constructor::named
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 periodOffset: 56
                 nameEnd: 62
@@ -59122,32 +67377,41 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
           final f @51
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: int
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: int
         augmented
@@ -59165,14 +67429,18 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             constructors
               const named @57
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@constructor::named
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 periodOffset: 56
                 nameEnd: 62
@@ -59210,26 +67478,32 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
             id: field_0
             getter: getter_0
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
             id: field_1
             getter: getter_1
           final foo @51
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -59238,19 +67512,23 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@fieldAugmentation::foo
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
             id: getter_0
             variable: field_0
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
             id: getter_1
             variable: field_1
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: int
             id: getter_2
@@ -59270,14 +67548,18 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             fields
               augment final foo @67
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -59315,26 +67597,32 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @55
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @61
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
             id: field_0
             getter: getter_0
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
             id: field_1
             getter: getter_1
           final foo @76
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -59343,19 +67631,23 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@fieldAugmentation::foo
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
             id: getter_0
             variable: field_0
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
             id: getter_1
             variable: field_1
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: int
             id: getter_2
@@ -59375,15 +67667,19 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
             fields
               augment final foo @67
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -59391,14 +67687,18 @@
                 augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A::@field::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A::@fieldAugmentation::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             fields
               augment final foo @67
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -59436,26 +67736,32 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @55
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @61
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
             id: field_0
             getter: getter_0
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
             id: field_1
             getter: getter_1
           final foo @76
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -59464,19 +67770,23 @@
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A::@fieldAugmentation::foo
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
             id: getter_0
             variable: field_0
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
             id: getter_1
             variable: field_1
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: int
             id: getter_2
@@ -59497,29 +67807,37 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 returnType: int
                 id: getter_3
                 variable: field_2
                 augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A::@getter::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             fields
               augment final foo @67
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -59557,26 +67875,32 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @55
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @61
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
             id: field_0
             getter: getter_0
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
             id: field_1
             getter: getter_1
           final foo @76
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -59585,19 +67909,23 @@
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A::@fieldAugmentation::foo
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
             id: getter_0
             variable: field_0
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
             id: getter_1
             variable: field_1
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: int
             id: getter_2
@@ -59618,15 +67946,19 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
             accessors
               augment set foo= @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@setterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 parameters
                   requiredPositional _ @69
@@ -59636,14 +67968,18 @@
                 variable: <null>
                 augmentationTargetAny: <thisLibrary>::<definingUnit>::@enum::A::@getter::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             fields
               augment final foo @67
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -59673,26 +68009,32 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
             id: field_0
             getter: getter_0
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
             id: field_1
             getter: getter_1
           final foo @51
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -59701,19 +68043,23 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@fieldAugmentation::foo
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
             id: getter_0
             variable: field_0
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
             id: getter_1
             variable: field_1
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: int
             id: getter_2
@@ -59733,14 +68079,18 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             fields
               augment final foo @70
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 type: double
                 shouldUseTypeForInitializerInference: true
@@ -59771,15 +68121,19 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
@@ -59796,6 +68150,7 @@
                   rightParenthesis: ) @0
                 staticType: A
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
             constantInitializer
@@ -59809,6 +68164,7 @@
                 rightBracket: ] @0
                 staticType: List<A>
           final foo @62
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: int Function()
             shouldUseTypeForInitializerInference: true
@@ -59820,15 +68176,19 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@fieldAugmentation::foo
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: int Function()
         augmented
@@ -59846,14 +68206,18 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             fields
               augment final foo @78
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 type: int Function()
                 shouldUseTypeForInitializerInference: true
@@ -59889,26 +68253,32 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
             id: field_0
             getter: getter_0
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
             id: field_1
             getter: getter_1
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: int
             id: field_2
@@ -59916,19 +68286,23 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@fieldAugmentation::foo
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
             id: getter_0
             variable: field_0
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
             id: getter_1
             variable: field_1
           get foo @49
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: int
             id: getter_2
@@ -59948,14 +68322,18 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             fields
               augment final foo @67
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -59985,26 +68363,32 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
             id: field_0
             getter: getter_0
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
             id: field_1
             getter: getter_1
           final foo1 @51
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -60012,19 +68396,23 @@
             getter: getter_2
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
             id: getter_0
             variable: field_0
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
             id: getter_1
             variable: field_1
           synthetic get foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: int
             id: getter_2
@@ -60046,14 +68434,18 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             fields
               final foo2 @59
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -60061,6 +68453,7 @@
                 getter: getter_3
             accessors
               synthetic get foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@getter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 returnType: int
                 id: getter_3
@@ -60089,10 +68482,13 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T1 @32
@@ -60101,36 +68497,43 @@
         supertype: Enum
         fields
           static const enumConstant v @40
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A<int>
             shouldUseTypeForInitializerInference: false
             id: field_0
             getter: getter_0
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A<dynamic>>
             id: field_1
             getter: getter_1
           final foo1 @61
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: T1
             id: field_2
             getter: getter_2
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A<int>
             id: getter_0
             variable: field_0
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A<dynamic>>
             id: getter_1
             variable: field_1
           synthetic get foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: T1
             id: getter_2
@@ -60156,10 +68559,13 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @44
@@ -60167,12 +68573,14 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             fields
               final foo2 @62
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 type: T2
                 id: field_3
                 getter: getter_3
             accessors
               synthetic get foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@getter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 returnType: T2
                 id: getter_3
@@ -60199,23 +68607,29 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
         constructors
           const @50
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             parameters
               requiredPositional final this.foo @57
@@ -60223,9 +68637,11 @@
                 field: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@field::foo
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
         augmented
@@ -60243,18 +68659,23 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             fields
               final foo @59
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@field::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 type: int
             accessors
               synthetic get foo @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@getter::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 returnType: int
 ''');
@@ -60279,23 +68700,29 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
         constructors
           const @47
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             constantInitializers
               ConstructorFieldInitializer
@@ -60309,9 +68736,11 @@
                   staticType: int
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
         augmented
@@ -60329,18 +68758,23 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             fields
               final foo @59
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@field::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 type: int
             accessors
               synthetic get foo @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@getter::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 returnType: int
 ''');
@@ -60367,45 +68801,55 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
             id: field_0
             getter: getter_0
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
             id: field_1
             getter: getter_1
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: int
             id: field_2
             getter: getter_2
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
             id: getter_0
             variable: field_0
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
             id: getter_1
             variable: field_1
           get foo1 @49
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: int
             id: getter_2
@@ -60427,20 +68871,25 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             fields
               synthetic foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 type: int
                 id: field_3
                 getter: getter_3
             accessors
               get foo2 @57
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@getter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 returnType: int
                 id: getter_3
@@ -60469,10 +68918,13 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T1 @32
@@ -60481,36 +68933,43 @@
         supertype: Enum
         fields
           static const enumConstant v @40
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A<int>
             shouldUseTypeForInitializerInference: false
             id: field_0
             getter: getter_0
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A<dynamic>>
             id: field_1
             getter: getter_1
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: T1
             id: field_2
             getter: getter_2
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A<int>
             id: getter_0
             variable: field_0
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A<dynamic>>
             id: getter_1
             variable: field_1
           abstract get foo1 @59
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: T1
             id: getter_2
@@ -60536,10 +68995,13 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @44
@@ -60547,12 +69009,14 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             fields
               synthetic foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 type: T2
                 id: field_3
                 getter: getter_3
             accessors
               abstract get foo2 @60
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@getter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 returnType: T2
                 id: getter_3
@@ -60581,26 +69045,32 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
             id: field_0
             getter: getter_0
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
             id: field_1
             getter: getter_1
           final foo @51
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -60608,19 +69078,23 @@
             getter: getter_2
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
             id: getter_0
             variable: field_0
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
             id: getter_1
             variable: field_1
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: int
             id: getter_2
@@ -60641,14 +69115,18 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 returnType: int
                 id: getter_3
@@ -60686,26 +69164,32 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @55
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @61
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
             id: field_0
             getter: getter_0
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
             id: field_1
             getter: getter_1
           final foo @76
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -60713,19 +69197,23 @@
             getter: getter_2
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
             id: getter_0
             variable: field_0
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
             id: getter_1
             variable: field_1
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: int
             id: getter_2
@@ -60746,15 +69234,19 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 returnType: int
                 id: getter_3
@@ -60762,14 +69254,18 @@
                 augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A::@getter::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A::@getterAugmentation::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
                 returnType: int
                 id: getter_4
@@ -60800,56 +69296,68 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
             id: field_0
             getter: getter_0
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
             id: field_1
             getter: getter_1
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: int
             id: field_2
             getter: getter_2
           synthetic foo2 @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: int
             id: field_3
             getter: getter_3
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
             id: getter_0
             variable: field_0
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
             id: getter_1
             variable: field_1
           get foo1 @49
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: int
             id: getter_2
             variable: field_2
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@getterAugmentation::foo1
           get foo2 @70
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: int
             id: getter_3
@@ -60871,14 +69379,18 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             accessors
               augment get foo1 @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@getterAugmentation::foo1
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 returnType: int
                 id: getter_4
@@ -60906,7 +69418,6 @@
 
     configuration
       ..withConstantInitializers = false
-      ..withReferences = true
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
@@ -61036,45 +69547,55 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @55
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @61
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
             id: field_0
             getter: getter_0
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
             id: field_1
             getter: getter_1
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: int
             id: field_2
             getter: getter_2
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
             id: getter_0
             variable: field_0
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
             id: getter_1
             variable: field_1
           get foo @74
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: int
             id: getter_2
@@ -61095,15 +69616,19 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 returnType: int
                 id: getter_3
@@ -61111,14 +69636,18 @@
                 augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A::@getter::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A::@getterAugmentation::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
                 returnType: int
                 id: getter_4
@@ -61148,32 +69677,39 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
             id: field_0
             getter: getter_0
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
             id: field_1
             getter: getter_1
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
             id: getter_0
             variable: field_0
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
             id: getter_1
@@ -61190,14 +69726,18 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 returnType: int
                 id: getter_2
@@ -61223,16 +69763,21 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class I1 @60
+        reference: <thisLibrary>::<definingUnit>::@class::I1
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I1
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
@@ -61240,20 +69785,25 @@
           I1
         fields
           static const enumConstant v @50
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
         augmented
@@ -61272,16 +69822,21 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           class I2 @67
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             interfaces
@@ -61314,16 +69869,21 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class I1 @60
+        reference: <thisLibrary>::<definingUnit>::@class::I1
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I1
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
@@ -61331,20 +69891,25 @@
           I1
         fields
           static const enumConstant v @50
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
         augmented
@@ -61364,16 +69929,21 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           class I2 @92
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
         enums
           augment enum A @67
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
@@ -61381,16 +69951,21 @@
               I2
       augmentationImports
         package:test/b.dart
+          reference: <thisLibrary>::@augmentation::package:test/b.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/b.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             classes
               class I3 @64
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@class::I3
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 constructors
                   synthetic @-1
+                    reference: <thisLibrary>::@augmentation::package:test/b.dart::@class::I3::@constructor::new
                     enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@class::I3
             enums
               augment enum A @39
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 interfaces
@@ -61416,16 +69991,21 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class I1 @70
+        reference: <thisLibrary>::<definingUnit>::@class::I1
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I1
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @32
@@ -61436,20 +70016,25 @@
           I1
         fields
           static const enumConstant v @53
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A<int>
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A<dynamic>>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A<int>
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A<dynamic>>
         augmented
@@ -61468,19 +70053,24 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           class I2 @75
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant E @78
                 defaultType: dynamic
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @44
@@ -61509,16 +70099,21 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class I1 @63
+        reference: <thisLibrary>::<definingUnit>::@class::I1
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I1
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @32
@@ -61529,20 +70124,25 @@
           I1
         fields
           static const enumConstant v @53
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A<dynamic>
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A<dynamic>>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A<dynamic>
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A<dynamic>>
         augmented
@@ -61560,19 +70160,24 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           class I2 @79
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant E @82
                 defaultType: dynamic
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @44
@@ -61604,33 +70209,42 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
         methods
           foo @46
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: void
         augmented
@@ -61649,14 +70263,18 @@
             <thisLibrary>::<definingUnit>::@enum::A::@method::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             methods
               bar @54
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@method::bar
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 returnType: void
 ''');
@@ -61679,15 +70297,19 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
@@ -61704,6 +70326,7 @@
                   rightParenthesis: ) @0
                 staticType: A
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
             constantInitializer
@@ -61718,12 +70341,15 @@
                 staticType: List<A>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
         augmented
@@ -61741,14 +70367,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@method::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             methods
               foo @54
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@method::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 parameters
                   optionalPositional default x @63
@@ -61781,37 +70411,47 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
         methods
           foo1 @46
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@method::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: void
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@methodAugmentation::foo1
           foo2 @63
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@method::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: void
         augmented
@@ -61830,14 +70470,18 @@
             <thisLibrary>::<definingUnit>::@enum::A::@method::foo2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             methods
               augment foo1 @62
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@methodAugmentation::foo1
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 returnType: void
                 augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A::@method::foo1
@@ -61861,9 +70505,7 @@
 }
 ''');
 
-    configuration
-      ..withConstantInitializers = false
-      ..withReferences = true;
+    configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -61963,9 +70605,7 @@
 }
 ''');
 
-    configuration
-      ..withConstantInitializers = false
-      ..withReferences = true;
+    configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -62079,33 +70719,42 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
         methods
           foo @46
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: void
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@methodAugmentation::foo
@@ -62124,29 +70773,37 @@
             <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A::@methodAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @67
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
             methods
               augment foo @87
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@methodAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 returnType: void
                 augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A::@method::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A::@methodAugmentation::foo
       augmentationImports
         package:test/b.dart
+          reference: <thisLibrary>::@augmentation::package:test/b.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/b.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             enums
               augment enum A @39
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 methods
                   augment foo @59
+                    reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A::@methodAugmentation::foo
                     enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
                     returnType: void
                     augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@methodAugmentation::foo
@@ -62172,10 +70829,13 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @32
@@ -62184,24 +70844,30 @@
         supertype: Enum
         fields
           static const enumConstant v @39
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A<int>
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A<dynamic>>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A<int>
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A<dynamic>>
         methods
           foo @53
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: T
         augmented
@@ -62222,10 +70888,13 @@
             <thisLibrary>::<definingUnit>::@enum::A::@method::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @44
@@ -62233,6 +70902,7 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             methods
               bar @56
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@method::bar
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 returnType: T2
 ''');
@@ -62257,10 +70927,13 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @32
@@ -62269,24 +70942,30 @@
         supertype: Enum
         fields
           static const enumConstant v @39
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A<int>
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A<dynamic>>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A<int>
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A<dynamic>>
         methods
           foo @53
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: T
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@methodAugmentation::foo
@@ -62307,10 +70986,13 @@
               augmentationSubstitution: {T2: T}
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @44
@@ -62318,6 +71000,7 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             methods
               augment foo @64
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@methodAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 returnType: T2
                 augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A::@method::foo
@@ -62342,10 +71025,13 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
@@ -62353,20 +71039,25 @@
           M1
         fields
           static const enumConstant v @44
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
         augmented
@@ -62385,21 +71076,26 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
     mixins
       mixin M1 @54
+        reference: <thisLibrary>::<definingUnit>::@mixin::M1
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             mixins
               M2
         mixins
           mixin M2 @61
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixin::M2
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             superclassConstraints
               Object
@@ -62431,10 +71127,13 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @55
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T1 @57
@@ -62445,20 +71144,25 @@
           M1<T1>
         fields
           static const enumConstant v @77
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A<int>
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A<dynamic>>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A<int>
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A<dynamic>>
         augmented
@@ -62478,6 +71182,7 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
     mixins
       mixin M1 @94
+        reference: <thisLibrary>::<definingUnit>::@mixin::M1
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant U1 @97
@@ -62486,10 +71191,13 @@
           Object
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @44
@@ -62500,6 +71208,7 @@
               M2<T2>
         mixins
           mixin M2 @65
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixin::M2
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant U2 @68
@@ -62507,10 +71216,13 @@
             superclassConstraints
               M1<U2>
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             typeParameters
               covariant T3 @44
@@ -62520,6 +71232,7 @@
               M3<T3>
         mixins
           mixin M3 @65
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixin::M3
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             typeParameters
               covariant U3 @68
@@ -62550,45 +71263,55 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
             id: field_0
             getter: getter_0
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
             id: field_1
             getter: getter_1
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: int
             id: field_2
             setter: setter_0
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
             id: getter_0
             variable: field_0
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
             id: getter_1
             variable: field_1
           set foo1= @45
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@setter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             parameters
               requiredPositional _ @54
@@ -62613,20 +71336,25 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             fields
               synthetic foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 type: int
                 id: field_3
                 setter: setter_1
             accessors
               set foo2= @53
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@setter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 parameters
                   requiredPositional _ @62
@@ -62658,26 +71386,32 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
             id: field_0
             getter: getter_0
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
             id: field_1
             getter: getter_1
           final foo @51
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -62685,19 +71419,23 @@
             getter: getter_2
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
             id: getter_0
             variable: field_0
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
             id: getter_1
             variable: field_1
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: int
             id: getter_2
@@ -62718,14 +71456,18 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             accessors
               augment set foo= @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@setterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 parameters
                   requiredPositional _ @69
@@ -62757,35 +71499,43 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
             id: field_0
             getter: getter_0
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
             id: field_1
             getter: getter_1
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
             id: getter_0
             variable: field_0
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
             id: getter_1
@@ -62804,14 +71554,18 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             accessors
               augment set foo= @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@setterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 parameters
                   requiredPositional _ @69
@@ -62844,50 +71598,61 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
             id: field_0
             getter: getter_0
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
             id: field_1
             getter: getter_1
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: int
             id: field_2
             setter: setter_0
           synthetic foo2 @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: int
             id: field_3
             setter: setter_1
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
             id: getter_0
             variable: field_0
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
             id: getter_1
             variable: field_1
           set foo1= @45
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@setter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             parameters
               requiredPositional _ @54
@@ -62897,6 +71662,7 @@
             variable: field_2
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@setterAugmentation::foo1
           set foo2= @66
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@setter::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             parameters
               requiredPositional _ @75
@@ -62921,14 +71687,18 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             accessors
               augment set foo1= @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@setterAugmentation::foo1
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 parameters
                   requiredPositional _ @70
@@ -62962,8 +71732,7 @@
 
     configuration
       ..withConstantInitializers = false
-      ..withConstructors = false
-      ..withReferences = true;
+      ..withConstructors = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -63040,8 +71809,7 @@
 
     configuration
       ..withConstantInitializers = false
-      ..withConstructors = false
-      ..withReferences = true;
+      ..withConstructors = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -63133,32 +71901,40 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @55
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @61
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
         constructors
           const named @82
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             periodOffset: 81
             nameEnd: 87
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@constructorAugmentation::named
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
         augmented
@@ -63174,29 +71950,37 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
             constructors
               augment const named @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@constructorAugmentation::named
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 periodOffset: 64
                 nameEnd: 70
                 augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A::@constructor::named
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A::@constructorAugmentation::named
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             constructors
               augment const named @65
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A::@constructorAugmentation::named
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::A
                 periodOffset: 64
                 nameEnd: 70
@@ -63222,15 +72006,19 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
@@ -63252,6 +72040,7 @@
                   rightParenthesis: ) @0
                 staticType: A
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
             constantInitializer
@@ -63266,15 +72055,18 @@
                 staticType: List<A>
         constructors
           const named @57
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             periodOffset: 56
             nameEnd: 62
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@constructorAugmentation::named
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
         augmented
@@ -63290,14 +72082,18 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             constructors
               augment const named @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@constructorAugmentation::named
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 periodOffset: 64
                 nameEnd: 70
@@ -63323,15 +72119,19 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
         supertype: Enum
         fields
           static const enumConstant v @36
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A
             shouldUseTypeForInitializerInference: false
@@ -63348,6 +72148,7 @@
                   rightParenthesis: ) @0
                 staticType: A
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A>
             constantInitializer
@@ -63362,13 +72163,16 @@
                 staticType: List<A>
         constructors
           const @47
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@constructorAugmentation::new
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A>
         augmented
@@ -63384,14 +72188,18 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A
             constructors
               augment const @63
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A::@constructorAugmentation::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
                 augmentationTarget: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
 ''');
@@ -63423,16 +72231,19 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     enums
       enum B @48
+        reference: <thisLibrary>::<definingUnit>::@enum::B
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::B
         supertype: Enum
@@ -63440,20 +72251,25 @@
           A
         fields
           static const enumConstant v @67
+            reference: <thisLibrary>::<definingUnit>::@enum::B::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::B
             type: B
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::B::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::B
             type: List<B>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::B
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::B::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::B
             returnType: B
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::B::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::B
             returnType: List<B>
         augmented
@@ -63473,14 +72289,18 @@
             <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::B::@method::foo
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         enums
           augment enum B @42
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::B
             methods
               foo @49
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::B::@method::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::B
                 parameters
                   requiredPositional a @53
@@ -63514,33 +72334,42 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum B @31
+        reference: <thisLibrary>::<definingUnit>::@enum::B
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::B
         supertype: Enum
         fields
           static const enumConstant v @37
+            reference: <thisLibrary>::<definingUnit>::@enum::B::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::B
             type: B
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::B::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::B
             type: List<B>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::B
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::B::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::B
             returnType: B
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::B::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::B
             returnType: List<B>
         methods
           foo @42
+            reference: <thisLibrary>::<definingUnit>::@enum::B::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::B
             parameters
               requiredPositional a @46
@@ -63563,16 +72392,19 @@
             <thisLibrary>::<definingUnit>::@enum::B::@method::foo
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       imports
         package:test/a.dart
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         libraryImports
           package:test/a.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         enums
           augment enum B @59
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::B
             interfaces
@@ -63605,33 +72437,42 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     enums
       enum B @31
+        reference: <thisLibrary>::<definingUnit>::@enum::B
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::B
         supertype: Enum
         fields
           static const enumConstant v @37
+            reference: <thisLibrary>::<definingUnit>::@enum::B::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::B
             type: B
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::B::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::B
             type: List<B>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::B
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::B::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::B
             returnType: B
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::B::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::B
             returnType: List<B>
         methods
           foo @42
+            reference: <thisLibrary>::<definingUnit>::@enum::B::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::B
             parameters
               requiredPositional a @46
@@ -63654,16 +72495,19 @@
             <thisLibrary>::<definingUnit>::@enum::B::@method::foo
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       imports
         package:test/a.dart
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         libraryImports
           package:test/a.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         enums
           augment enum B @59
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@enumAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@enum::B
             mixins
@@ -63688,16 +72532,21 @@
     configuration.withConstantInitializers = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class B @59
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
     enums
       enum A @30
+        reference: <thisLibrary>::<definingUnit>::@enum::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @32
@@ -63707,20 +72556,25 @@
         supertype: Enum
         fields
           static const enumConstant v @49
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: A<B>
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             type: List<A<B>>
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: A<B>
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::A::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::A
             returnType: List<A<B>>
         augmented
@@ -63736,10 +72590,13 @@
             <thisLibrary>::<definingUnit>::@enum::A::@getter::values
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         enums
           augment enum A @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@enumAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T @44
@@ -63785,29 +72642,38 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @35
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         augmented
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @72
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
       augmentationImports
         package:test/b.dart
+          reference: <thisLibrary>::@augmentation::package:test/b.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/b.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             extensions
               augment A @44
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
   exportedReferences
@@ -63839,19 +72705,25 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @72
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             extendedType: InvalidType
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
             methods
               foo1 @83
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@method::foo1
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 returnType: void
             augmented
@@ -63860,14 +72732,18 @@
                 <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A::@method::foo2
       augmentationImports
         package:test/b.dart
+          reference: <thisLibrary>::@augmentation::package:test/b.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/b.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             extensions
               augment A @44
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 methods
                   foo2 @55
+                    reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A::@method::foo2
                     enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
                     returnType: void
 ''');
@@ -63891,15 +72767,19 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @35
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         fields
           static foo @59
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -63909,11 +72789,13 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@fieldAugmentation::foo
         accessors
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic static set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             parameters
               requiredPositional _foo @-1
@@ -63929,14 +72811,18 @@
             <thisLibrary>::<definingUnit>::@extension::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             fields
               augment static foo @72
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -63971,15 +72857,19 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @60
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         fields
           static foo @84
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -63989,11 +72879,13 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@fieldAugmentation::foo
         accessors
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic static set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             parameters
               requiredPositional _foo @-1
@@ -64009,15 +72901,19 @@
             <thisLibrary>::<definingUnit>::@extension::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
             fields
               augment static foo @72
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -64025,14 +72921,18 @@
                 augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A::@field::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A::@fieldAugmentation::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             fields
               augment static foo @72
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -64067,15 +72967,19 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @60
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         fields
           static foo @84
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -64085,12 +72989,14 @@
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A::@fieldAugmentation::foo
         accessors
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: int
             id: getter_0
             variable: field_0
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@getterAugmentation::foo
           synthetic static set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             parameters
               requiredPositional _foo @-1
@@ -64106,29 +73012,37 @@
             <thisLibrary>::<definingUnit>::@extension::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
             accessors
               augment static get foo @76
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 returnType: int
                 id: getter_1
                 variable: field_0
                 augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A::@getter::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             fields
               augment static foo @72
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -64163,15 +73077,19 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @60
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         fields
           static foo @84
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -64181,11 +73099,13 @@
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A::@fieldAugmentation::foo
         accessors
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic static set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             parameters
               requiredPositional _foo @-1
@@ -64202,15 +73122,19 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@setterAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
             accessors
               augment static set foo= @72
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@setterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 parameters
                   requiredPositional _ @80
@@ -64220,14 +73144,18 @@
                 variable: field_0
                 augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A::@setter::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             fields
               augment static foo @72
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -64254,15 +73182,19 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @35
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         fields
           static foo @59
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -64272,11 +73204,13 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@fieldAugmentation::foo
         accessors
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic static set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             parameters
               requiredPositional _foo @-1
@@ -64292,14 +73226,18 @@
             <thisLibrary>::<definingUnit>::@extension::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             fields
               augment static foo @75
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 type: double
                 shouldUseTypeForInitializerInference: true
@@ -64328,15 +73266,19 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @35
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         fields
           synthetic static foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             type: int
             id: field_0
@@ -64344,6 +73286,7 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@fieldAugmentation::foo
         accessors
           static get foo @63
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: int
             id: getter_0
@@ -64355,14 +73298,18 @@
             <thisLibrary>::<definingUnit>::@extension::A::@getter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             fields
               augment static foo @72
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -64389,15 +73336,19 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @35
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         fields
           static foo1 @59
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -64406,11 +73357,13 @@
             setter: setter_0
         accessors
           synthetic static get foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic static set foo1= @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@setter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             parameters
               requiredPositional _foo1 @-1
@@ -64429,14 +73382,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@setter::foo2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             fields
               static foo2 @64
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -64445,11 +73402,13 @@
                 setter: setter_1
             accessors
               synthetic static get foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@getter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 returnType: int
                 id: getter_1
                 variable: field_1
               synthetic static set foo2= @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@setter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 parameters
                   requiredPositional _foo2 @-1
@@ -64478,21 +73437,26 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @35
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         fields
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             type: int
             id: field_0
             getter: getter_0
         accessors
           get foo1 @56
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: int
             id: getter_0
@@ -64506,20 +73470,25 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@getter::foo2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             fields
               synthetic foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 type: int
                 id: field_1
                 getter: getter_1
             accessors
               get foo2 @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@getter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 returnType: int
                 id: getter_1
@@ -64545,10 +73514,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @35
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T1 @37
@@ -64557,12 +73529,14 @@
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         fields
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             type: T1
             id: field_0
             getter: getter_0
         accessors
           abstract get foo1 @59
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: T1
             id: getter_0
@@ -64580,10 +73554,13 @@
               augmentationSubstitution: {T2: T1}
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @49
@@ -64591,12 +73568,14 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             fields
               synthetic foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 type: T2
                 id: field_1
                 getter: getter_1
             accessors
               abstract get foo2 @64
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@getter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 returnType: T2
                 id: getter_1
@@ -64622,15 +73601,19 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @35
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         fields
           static foo @59
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -64639,12 +73622,14 @@
             setter: setter_0
         accessors
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: int
             id: getter_0
             variable: field_0
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@getterAugmentation::foo
           synthetic static set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             parameters
               requiredPositional _foo @-1
@@ -64660,14 +73645,18 @@
             <thisLibrary>::<definingUnit>::@extension::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             accessors
               augment static get foo @76
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 returnType: int
                 id: getter_1
@@ -64702,15 +73691,19 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @60
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         fields
           static foo @84
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -64719,12 +73712,14 @@
             setter: setter_0
         accessors
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: int
             id: getter_0
             variable: field_0
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@getterAugmentation::foo
           synthetic static set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             parameters
               requiredPositional _foo @-1
@@ -64740,15 +73735,19 @@
             <thisLibrary>::<definingUnit>::@extension::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
             accessors
               augment static get foo @76
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 returnType: int
                 id: getter_1
@@ -64756,14 +73755,18 @@
                 augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A::@getter::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A::@getterAugmentation::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             accessors
               augment static get foo @76
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
                 returnType: int
                 id: getter_2
@@ -64791,32 +73794,39 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @35
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         fields
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             type: int
             id: field_0
             getter: getter_0
           synthetic foo2 @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@field::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             type: int
             id: field_1
             getter: getter_1
         accessors
           get foo1 @56
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: int
             id: getter_0
             variable: field_0
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@getterAugmentation::foo1
           get foo2 @77
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@getter::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: int
             id: getter_1
@@ -64830,14 +73840,18 @@
             <thisLibrary>::<definingUnit>::@extension::A::@getter::foo2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             accessors
               augment get foo1 @69
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@getterAugmentation::foo1
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 returnType: int
                 id: getter_2
@@ -64872,21 +73886,26 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @60
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             type: int
             id: field_0
             getter: getter_0
         accessors
           get foo @81
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: int
             id: getter_0
@@ -64899,15 +73918,19 @@
             <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A::@getterAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
             accessors
               augment get foo @69
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 returnType: int
                 id: getter_1
@@ -64915,14 +73938,18 @@
                 augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A::@getter::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A::@getterAugmentation::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             accessors
               augment get foo @69
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
                 returnType: int
                 id: getter_2
@@ -64948,15 +73975,19 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @35
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         methods
           foo @53
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: void
         augmented
@@ -64965,14 +73996,18 @@
             <thisLibrary>::<definingUnit>::@extension::A::@method::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             methods
               bar @58
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@method::bar
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 returnType: void
 ''');
@@ -64996,19 +74031,24 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @35
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         methods
           foo1 @53
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@method::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: void
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@methodAugmentation::foo1
           foo2 @70
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@method::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: void
         augmented
@@ -65017,14 +74057,18 @@
             <thisLibrary>::<definingUnit>::@extension::A::@method::foo2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             methods
               augment foo1 @66
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@methodAugmentation::foo1
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 returnType: void
                 augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A::@method::foo1
@@ -65056,15 +74100,19 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @35
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         methods
           foo @53
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: void
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@methodAugmentation::foo
@@ -65073,29 +74121,37 @@
             <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A::@methodAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @72
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
             methods
               augment foo @91
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@methodAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 returnType: void
                 augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A::@method::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A::@methodAugmentation::foo
       augmentationImports
         package:test/b.dart
+          reference: <thisLibrary>::@augmentation::package:test/b.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/b.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             extensions
               augment A @44
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 methods
                   augment foo @63
+                    reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A::@methodAugmentation::foo
                     enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@extensionAugmentation::A
                     returnType: void
                     augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@methodAugmentation::foo
@@ -65119,10 +74175,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @35
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @37
@@ -65131,6 +74190,7 @@
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         methods
           foo @53
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: T
         augmented
@@ -65141,10 +74201,13 @@
             <thisLibrary>::<definingUnit>::@extension::A::@method::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @49
@@ -65152,6 +74215,7 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             methods
               bar @60
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@method::bar
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 returnType: T2
 ''');
@@ -65174,10 +74238,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @35
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @37
@@ -65186,6 +74253,7 @@
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         methods
           foo @53
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: T
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@methodAugmentation::foo
@@ -65196,10 +74264,13 @@
               augmentationSubstitution: {T2: T}
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @49
@@ -65207,6 +74278,7 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             methods
               augment foo @68
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@methodAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 returnType: T2
                 augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A::@method::foo
@@ -65231,19 +74303,24 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @35
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         methods
           foo @53
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: void
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@methodAugmentation::foo
           bar @69
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@method::bar
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: void
         augmented
@@ -65254,10 +74331,13 @@
               augmentationSubstitution: {T: InvalidType}
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T @49
@@ -65265,6 +74345,7 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             methods
               augment foo @69
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@methodAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 returnType: void
                 augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A::@method::foo
@@ -65289,21 +74370,26 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @35
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         fields
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             type: int
             id: field_0
             setter: setter_0
         accessors
           set foo1= @52
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@setter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             parameters
               requiredPositional _ @61
@@ -65320,20 +74406,25 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@setter::foo2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             fields
               synthetic foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 type: int
                 id: field_1
                 setter: setter_1
             accessors
               set foo2= @57
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@setter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 parameters
                   requiredPositional _ @66
@@ -65362,15 +74453,19 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @35
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         fields
           static foo @59
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -65379,11 +74474,13 @@
             setter: setter_0
         accessors
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic static set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             parameters
               requiredPositional _foo @-1
@@ -65400,14 +74497,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@setterAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             accessors
               augment static set foo= @72
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@setterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 parameters
                   requiredPositional _ @80
@@ -65438,26 +74539,32 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensions
       A @35
+        reference: <thisLibrary>::<definingUnit>::@extension::A
         enclosingElement: <thisLibrary>::<definingUnit>
         extendedType: int
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
         fields
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             type: int
             id: field_0
             setter: setter_0
           synthetic foo2 @-1
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@field::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             type: int
             id: field_1
             setter: setter_1
         accessors
           set foo1= @52
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@setter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             parameters
               requiredPositional _ @61
@@ -65467,6 +74574,7 @@
             variable: field_0
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@setterAugmentation::foo1
           set foo2= @73
+            reference: <thisLibrary>::<definingUnit>::@extension::A::@setter::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@extension::A
             parameters
               requiredPositional _ @82
@@ -65483,14 +74591,18 @@
             <thisLibrary>::<definingUnit>::@extension::A::@setter::foo2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensions
           augment A @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extension::A
             accessors
               augment set foo1= @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A::@setterAugmentation::foo1
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionAugmentation::A
                 parameters
                   requiredPositional _ @74
@@ -65522,9 +74634,7 @@
 extension A on int {}
 ''');
 
-    configuration
-      ..withConstructors = false
-      ..withReferences = true;
+    configuration.withConstructors = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -65580,9 +74690,7 @@
 extension A on int {}
 ''');
 
-    configuration
-      ..withConstructors = false
-      ..withReferences = true;
+    configuration.withConstructors = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -65656,10 +74764,13 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -65667,10 +74778,12 @@
         typeErasure: int
         fields
           final it @46
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @46
@@ -65678,6 +74791,7 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
         augmented
@@ -65689,19 +74803,25 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @77
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
       augmentationImports
         package:test/b.dart
+          reference: <thisLibrary>::@augmentation::package:test/b.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/b.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             extensionTypes
               augment A @49
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
   exportedReferences
@@ -65733,14 +74853,19 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @77
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
             representation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@field::it
@@ -65748,10 +74873,12 @@
             typeErasure: int
             fields
               final it @83
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@field::it
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 type: int
             constructors
               augment @77
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@constructorAugmentation::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 parameters
                   requiredPositional final this.it @83
@@ -65759,10 +74886,12 @@
                     field: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@field::it
             accessors
               synthetic get it @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@getter::it
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 returnType: int
             methods
               foo1 @96
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@method::foo1
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 returnType: void
             augmented
@@ -65777,14 +74906,18 @@
                 <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A::@method::foo2
       augmentationImports
         package:test/b.dart
+          reference: <thisLibrary>::@augmentation::package:test/b.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/b.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             extensionTypes
               augment A @49
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 methods
                   foo2 @68
+                    reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A::@method::foo2
                     enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
                     returnType: void
 ''');
@@ -65805,10 +74938,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -65816,10 +74952,12 @@
         typeErasure: int
         fields
           final it @46
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @46
@@ -65827,6 +74965,7 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
         augmented
@@ -65839,14 +74978,18 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             constructors
               named @68
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@constructor::named
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 periodOffset: 67
                 nameEnd: 73
@@ -65868,10 +75011,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T1 @42
@@ -65882,10 +75028,12 @@
         typeErasure: int
         fields
           final it @50
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @50
@@ -65893,6 +75041,7 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
         augmented
@@ -65907,10 +75056,13 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @54
@@ -65918,6 +75070,7 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             constructors
               named @72
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@constructor::named
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 periodOffset: 71
                 nameEnd: 77
@@ -65942,10 +75095,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -65953,10 +75109,12 @@
         typeErasure: int
         fields
           final it @52
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         constructors
           named @42
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             periodOffset: 41
             nameEnd: 47
@@ -65966,6 +75124,7 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
         augmented
@@ -65978,14 +75137,18 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             constructors
               @66
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
 ''');
   }
@@ -66008,10 +75171,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -66019,11 +75185,13 @@
         typeErasure: int
         fields
           final it @46
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_0
             getter: getter_0
           static foo @65
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -66033,6 +75201,7 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@fieldAugmentation::foo
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @46
@@ -66040,16 +75209,19 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_1
             variable: field_1
           synthetic static set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional _foo @-1
@@ -66069,14 +75241,18 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             fields
               augment static foo @85
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -66111,10 +75287,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @65
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -66122,11 +75301,13 @@
         typeErasure: int
         fields
           final it @71
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_0
             getter: getter_0
           static foo @90
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -66136,6 +75317,7 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@fieldAugmentation::foo
         constructors
           @65
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @71
@@ -66143,16 +75325,19 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_1
             variable: field_1
           synthetic static set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional _foo @-1
@@ -66172,15 +75357,19 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
             fields
               augment static foo @85
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -66188,14 +75377,18 @@
                 augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A::@fieldAugmentation::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             fields
               augment static foo @85
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -66230,10 +75423,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @65
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -66241,11 +75437,13 @@
         typeErasure: int
         fields
           final it @71
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_0
             getter: getter_0
           static foo @90
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -66255,6 +75453,7 @@
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A::@fieldAugmentation::foo
         constructors
           @65
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @71
@@ -66262,17 +75461,20 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_1
             variable: field_1
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@getterAugmentation::foo
           synthetic static set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional _foo @-1
@@ -66292,29 +75494,37 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
             accessors
               augment static get foo @89
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 returnType: int
                 id: getter_2
                 variable: field_1
                 augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             fields
               augment static foo @85
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -66349,10 +75559,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @65
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -66360,11 +75573,13 @@
         typeErasure: int
         fields
           final it @71
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_0
             getter: getter_0
           static foo @90
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -66374,6 +75589,7 @@
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A::@fieldAugmentation::foo
         constructors
           @65
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @71
@@ -66381,16 +75597,19 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_1
             variable: field_1
           synthetic static set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional _foo @-1
@@ -66411,15 +75630,19 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
             accessors
               augment static set foo= @85
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@setterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 parameters
                   requiredPositional _ @93
@@ -66429,14 +75652,18 @@
                 variable: field_1
                 augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A::@setter::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             fields
               augment static foo @85
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -66463,10 +75690,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -66474,11 +75704,13 @@
         typeErasure: int
         fields
           final it @46
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_0
             getter: getter_0
           static foo @65
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -66488,6 +75720,7 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@fieldAugmentation::foo
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @46
@@ -66495,16 +75728,19 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_1
             variable: field_1
           synthetic static set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional _foo @-1
@@ -66524,14 +75760,18 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             fields
               augment static foo @88
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 type: double
                 shouldUseTypeForInitializerInference: true
@@ -66560,10 +75800,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -66571,11 +75814,13 @@
         typeErasure: int
         fields
           final it @46
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_0
             getter: getter_0
           synthetic static foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_1
@@ -66583,6 +75828,7 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@fieldAugmentation::foo
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @46
@@ -66590,11 +75836,13 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_0
             variable: field_0
           static get foo @69
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_1
@@ -66610,14 +75858,18 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             fields
               augment static foo @85
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -66644,10 +75896,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -66655,11 +75910,13 @@
         typeErasure: int
         fields
           final it @46
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_0
             getter: getter_0
           static foo1 @65
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -66668,6 +75925,7 @@
             setter: setter_0
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @46
@@ -66675,16 +75933,19 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic static get foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_1
             variable: field_1
           synthetic static set foo1= @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@setter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional _foo1 @-1
@@ -66707,14 +75968,18 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             fields
               static foo2 @77
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -66723,11 +75988,13 @@
                 setter: setter_1
             accessors
               synthetic static get foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@getter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 returnType: int
                 id: getter_2
                 variable: field_2
               synthetic static set foo2= @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@setter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 parameters
                   requiredPositional _foo2 @-1
@@ -66756,10 +76023,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -66767,17 +76037,20 @@
         typeErasure: int
         fields
           final it @46
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_0
             getter: getter_0
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_1
             getter: getter_1
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @46
@@ -66785,11 +76058,13 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_0
             variable: field_0
           get foo1 @62
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_1
@@ -66807,20 +76082,25 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             fields
               synthetic foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 type: int
                 id: field_2
                 getter: getter_2
             accessors
               get foo2 @74
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@getter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 returnType: int
                 id: getter_2
@@ -66846,10 +76126,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T1 @42
@@ -66860,17 +76143,20 @@
         typeErasure: int
         fields
           final it @50
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_0
             getter: getter_0
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: T1
             id: field_1
             getter: getter_1
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @50
@@ -66878,11 +76164,13 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_0
             variable: field_0
           abstract get foo1 @65
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: T1
             id: getter_1
@@ -66904,10 +76192,13 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @54
@@ -66915,12 +76206,14 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             fields
               synthetic foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 type: T2
                 id: field_2
                 getter: getter_2
             accessors
               abstract get foo2 @77
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@getter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 returnType: T2
                 id: getter_2
@@ -66946,10 +76239,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -66957,11 +76253,13 @@
         typeErasure: int
         fields
           final it @46
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_0
             getter: getter_0
           static foo @65
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -66970,6 +76268,7 @@
             setter: setter_0
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @46
@@ -66977,17 +76276,20 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_1
             variable: field_1
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@getterAugmentation::foo
           synthetic static set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional _foo @-1
@@ -67007,14 +76309,18 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             accessors
               augment static get foo @89
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 returnType: int
                 id: getter_2
@@ -67049,10 +76355,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @65
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -67060,11 +76369,13 @@
         typeErasure: int
         fields
           final it @71
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_0
             getter: getter_0
           static foo @90
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -67073,6 +76384,7 @@
             setter: setter_0
         constructors
           @65
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @71
@@ -67080,17 +76392,20 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_1
             variable: field_1
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@getterAugmentation::foo
           synthetic static set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional _foo @-1
@@ -67110,15 +76425,19 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
             accessors
               augment static get foo @89
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 returnType: int
                 id: getter_2
@@ -67126,14 +76445,18 @@
                 augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A::@getterAugmentation::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             accessors
               augment static get foo @89
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
                 returnType: int
                 id: getter_3
@@ -67161,10 +76484,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -67172,22 +76498,26 @@
         typeErasure: int
         fields
           final it @46
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_0
             getter: getter_0
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_1
             getter: getter_1
           synthetic foo2 @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_2
             getter: getter_2
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @46
@@ -67195,17 +76525,20 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_0
             variable: field_0
           get foo1 @62
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_1
             variable: field_1
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@getterAugmentation::foo1
           get foo2 @83
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_2
@@ -67223,14 +76556,18 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             accessors
               augment get foo1 @82
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@getterAugmentation::foo1
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 returnType: int
                 id: getter_3
@@ -67265,10 +76602,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @65
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -67276,17 +76616,20 @@
         typeErasure: int
         fields
           final it @71
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_0
             getter: getter_0
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_1
             getter: getter_1
         constructors
           @65
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @71
@@ -67294,11 +76637,13 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_0
             variable: field_0
           get foo @87
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_1
@@ -67315,15 +76660,19 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
             accessors
               augment get foo @82
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 returnType: int
                 id: getter_2
@@ -67331,14 +76680,18 @@
                 augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A::@getterAugmentation::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             accessors
               augment get foo @82
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
                 returnType: int
                 id: getter_3
@@ -67363,10 +76716,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -67376,10 +76732,12 @@
           I1
         fields
           final it @46
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
         augmented
@@ -67391,39 +76749,48 @@
           accessors
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
       I1 @82
+        reference: <thisLibrary>::<definingUnit>::@extensionType::I1
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::I1::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::I1::@constructor::new
         typeErasure: int
         fields
           final it @89
+            reference: <thisLibrary>::<definingUnit>::@extensionType::I1::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::I1
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::I1::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::I1
             returnType: int
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             interfaces
               I2
           I2 @94
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             representation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2::@field::it
             primaryConstructor: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2::@constructor::new
             typeErasure: int
             fields
               final it @101
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2::@field::it
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2
                 type: int
             accessors
               synthetic get it @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2::@getter::it
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2
                 returnType: int
 ''');
@@ -67451,10 +76818,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -67464,10 +76834,12 @@
           I1
         fields
           final it @46
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @46
@@ -67475,6 +76847,7 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
         augmented
@@ -67489,16 +76862,19 @@
           accessors
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
       I1 @82
+        reference: <thisLibrary>::<definingUnit>::@extensionType::I1
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::I1::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::I1::@constructor::new
         typeErasure: int
         fields
           final it @89
+            reference: <thisLibrary>::<definingUnit>::@extensionType::I1::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::I1
             type: int
         constructors
           @82
+            reference: <thisLibrary>::<definingUnit>::@extensionType::I1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::I1
             parameters
               requiredPositional final this.it @89
@@ -67506,30 +76882,37 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::I1::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::I1::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::I1
             returnType: int
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @77
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
             interfaces
               I2
           I2 @119
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             representation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2::@field::it
             primaryConstructor: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2::@constructor::new
             typeErasure: int
             fields
               final it @126
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2::@field::it
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2
                 type: int
             constructors
               @119
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2
                 parameters
                   requiredPositional final this.it @126
@@ -67537,29 +76920,36 @@
                     field: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2::@field::it
             accessors
               synthetic get it @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2::@getter::it
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2
                 returnType: int
       augmentationImports
         package:test/b.dart
+          reference: <thisLibrary>::@augmentation::package:test/b.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/b.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             extensionTypes
               augment A @49
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 interfaces
                   I3
               I3 @91
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionType::I3
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 representation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionType::I3::@field::it
                 primaryConstructor: <thisLibrary>::@augmentation::package:test/b.dart::@extensionType::I3::@constructor::new
                 typeErasure: int
                 fields
                   final it @98
+                    reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionType::I3::@field::it
                     enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@extensionType::I3
                     type: int
                 constructors
                   @91
+                    reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionType::I3::@constructor::new
                     enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@extensionType::I3
                     parameters
                       requiredPositional final this.it @98
@@ -67567,6 +76957,7 @@
                         field: <thisLibrary>::@augmentation::package:test/b.dart::@extensionType::I3::@field::it
                 accessors
                   synthetic get it @-1
+                    reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionType::I3::@getter::it
                     enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@extensionType::I3
                     returnType: int
 ''');
@@ -67587,10 +76978,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @42
@@ -67603,10 +76997,12 @@
           I1
         fields
           final it @49
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @49
@@ -67614,6 +77010,7 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
         augmented
@@ -67627,16 +77024,19 @@
           accessors
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
       I1 @85
+        reference: <thisLibrary>::<definingUnit>::@extensionType::I1
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::I1::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::I1::@constructor::new
         typeErasure: int
         fields
           final it @92
+            reference: <thisLibrary>::<definingUnit>::@extensionType::I1::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::I1
             type: int
         constructors
           @85
+            reference: <thisLibrary>::<definingUnit>::@extensionType::I1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::I1
             parameters
               requiredPositional final this.it @92
@@ -67644,14 +77044,18 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::I1::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::I1::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::I1
             returnType: int
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @54
@@ -67660,6 +77064,7 @@
             interfaces
               I2<T2>
           I2 @102
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant E @105
@@ -67669,10 +77074,12 @@
             typeErasure: int
             fields
               final it @112
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2::@field::it
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2
                 type: int
             constructors
               @102
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2
                 parameters
                   requiredPositional final this.it @112
@@ -67680,6 +77087,7 @@
                     field: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2::@field::it
             accessors
               synthetic get it @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2::@getter::it
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2
                 returnType: int
 ''');
@@ -67700,10 +77108,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @42
@@ -67716,10 +77127,12 @@
           I1
         fields
           final it @49
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @49
@@ -67727,6 +77140,7 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
         augmented
@@ -67739,16 +77153,19 @@
           accessors
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
       I1 @85
+        reference: <thisLibrary>::<definingUnit>::@extensionType::I1
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::I1::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::I1::@constructor::new
         typeErasure: int
         fields
           final it @92
+            reference: <thisLibrary>::<definingUnit>::@extensionType::I1::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::I1
             type: int
         constructors
           @85
+            reference: <thisLibrary>::<definingUnit>::@extensionType::I1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::I1
             parameters
               requiredPositional final this.it @92
@@ -67756,14 +77173,18 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::I1::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::I1::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::I1
             returnType: int
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @54
@@ -67774,6 +77195,7 @@
             interfaces
               I2<T2>
           I2 @106
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant E @109
@@ -67783,10 +77205,12 @@
             typeErasure: int
             fields
               final it @116
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2::@field::it
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2
                 type: int
             constructors
               @106
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2
                 parameters
                   requiredPositional final this.it @116
@@ -67794,6 +77218,7 @@
                     field: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2::@field::it
             accessors
               synthetic get it @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2::@getter::it
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionType::I2
                 returnType: int
 ''');
@@ -67816,10 +77241,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -67827,10 +77255,12 @@
         typeErasure: int
         fields
           final it @46
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @46
@@ -67838,10 +77268,12 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
         methods
           foo @59
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: void
         augmented
@@ -67856,14 +77288,18 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@method::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             methods
               bar @71
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@method::bar
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 returnType: void
 ''');
@@ -67887,10 +77323,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -67898,10 +77337,12 @@
         typeErasure: int
         fields
           final it @46
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @46
@@ -67909,14 +77350,17 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
         methods
           foo1 @59
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@method::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: void
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@methodAugmentation::foo1
           foo2 @76
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@method::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: void
         augmented
@@ -67931,14 +77375,18 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@method::foo2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             methods
               augment foo1 @79
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@methodAugmentation::foo1
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 returnType: void
                 augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A::@method::foo1
@@ -67970,10 +77418,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -67981,10 +77432,12 @@
         typeErasure: int
         fields
           final it @46
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @46
@@ -67992,10 +77445,12 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
         methods
           foo @59
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: void
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@methodAugmentation::foo
@@ -68010,29 +77465,37 @@
             <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A::@methodAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @77
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
             methods
               augment foo @104
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@methodAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 returnType: void
                 augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A::@method::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A::@methodAugmentation::foo
       augmentationImports
         package:test/b.dart
+          reference: <thisLibrary>::@augmentation::package:test/b.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/b.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             extensionTypes
               augment A @49
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 methods
                   augment foo @76
+                    reference: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A::@methodAugmentation::foo
                     enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@extensionTypeAugmentation::A
                     returnType: void
                     augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@methodAugmentation::foo
@@ -68056,10 +77519,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @42
@@ -68070,10 +77536,12 @@
         typeErasure: int
         fields
           final it @49
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @49
@@ -68081,10 +77549,12 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
         methods
           foo @59
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: T
         augmented
@@ -68101,10 +77571,13 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@method::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @54
@@ -68112,6 +77585,7 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             methods
               bar @73
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@method::bar
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 returnType: T2
 ''');
@@ -68134,10 +77608,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @42
@@ -68148,10 +77625,12 @@
         typeErasure: int
         fields
           final it @49
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @49
@@ -68159,10 +77638,12 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
         methods
           foo @59
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: T
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@methodAugmentation::foo
@@ -68179,10 +77660,13 @@
               augmentationSubstitution: {T2: T}
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @54
@@ -68190,6 +77674,7 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             methods
               augment foo @81
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@methodAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 returnType: T2
                 augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A::@method::foo
@@ -68214,10 +77699,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -68225,10 +77713,12 @@
         typeErasure: int
         fields
           final it @46
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @46
@@ -68236,14 +77726,17 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
         methods
           foo @59
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: void
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@methodAugmentation::foo
           bar @75
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@method::bar
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: void
         augmented
@@ -68260,10 +77753,13 @@
               augmentationSubstitution: {T: InvalidType}
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T @54
@@ -68271,6 +77767,7 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             methods
               augment foo @82
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@methodAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 returnType: void
                 augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A::@method::foo
@@ -68295,10 +77792,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -68306,17 +77806,20 @@
         typeErasure: int
         fields
           final it @46
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_0
             getter: getter_0
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_1
             setter: setter_0
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @46
@@ -68324,11 +77827,13 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_0
             variable: field_0
           set foo1= @58
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@setter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional _ @67
@@ -68349,20 +77854,25 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             fields
               synthetic foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 type: int
                 id: field_2
                 setter: setter_1
             accessors
               set foo2= @70
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@setter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 parameters
                   requiredPositional _ @79
@@ -68391,10 +77901,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -68402,11 +77915,13 @@
         typeErasure: int
         fields
           final it @46
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_0
             getter: getter_0
           static foo @65
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -68415,6 +77930,7 @@
             setter: setter_0
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @46
@@ -68422,16 +77938,19 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_1
             variable: field_1
           synthetic static set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional _foo @-1
@@ -68452,14 +77971,18 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             accessors
               augment static set foo= @85
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@setterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 parameters
                   requiredPositional _ @93
@@ -68490,10 +78013,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @40
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -68501,22 +78027,26 @@
         typeErasure: int
         fields
           final it @46
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_0
             getter: getter_0
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_1
             setter: setter_0
           synthetic foo2 @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             id: field_2
             setter: setter_1
         constructors
           @40
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @46
@@ -68524,11 +78054,13 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
             id: getter_0
             variable: field_0
           set foo1= @58
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@setter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional _ @67
@@ -68538,6 +78070,7 @@
             variable: field_1
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@setterAugmentation::foo1
           set foo2= @79
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@setter::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional _ @88
@@ -68558,14 +78091,18 @@
             <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         extensionTypes
           augment A @52
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@extensionType::A
             accessors
               augment set foo1= @78
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A::@setterAugmentation::foo1
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@extensionTypeAugmentation::A
                 parameters
                   requiredPositional _ @87
@@ -68597,9 +78134,7 @@
 extension type A(int it) {}
 ''');
 
-    configuration
-      ..withConstructors = false
-      ..withReferences = true;
+    configuration.withConstructors = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -68667,9 +78202,7 @@
 extension type A(int it) {}
 ''');
 
-    configuration
-      ..withConstructors = false
-      ..withReferences = true;
+    configuration.withConstructors = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -68746,20 +78279,25 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @21
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
         typeErasure: int
         fields
           final it @27
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         constructors
           const @21
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @27
@@ -68767,6 +78305,7 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
 ''');
@@ -68780,10 +78319,13 @@
     configuration.withCodeRanges = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 0
         codeLength: 33
@@ -68792,12 +78334,14 @@
         typeErasure: int
         fields
           final it @27
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             codeOffset: 23
             codeLength: 6
             type: int
         constructors
           named @17
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             codeOffset: 16
             codeLength: 14
@@ -68811,6 +78355,7 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
 ''');
@@ -68825,26 +78370,32 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
         typeErasure: num
         fields
           final it @21
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: num
         constructors
           @15
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @21
                 type: num
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
           named @31
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             periodOffset: 30
             nameEnd: 36
@@ -68854,6 +78405,7 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: num
 ''');
@@ -68868,26 +78420,32 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
         typeErasure: num
         fields
           final it @21
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: num
         constructors
           @15
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @21
                 type: num
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
           named @31
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             periodOffset: 30
             nameEnd: 36
@@ -68897,6 +78455,7 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: num
 ''');
@@ -68911,26 +78470,32 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
         typeErasure: num
         fields
           final it @21
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: num
         constructors
           @15
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @21
                 type: num
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
           const named @37
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::named
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             periodOffset: 36
             nameEnd: 42
@@ -68950,6 +78515,7 @@
                   staticType: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: num
 ''');
@@ -68963,10 +78529,13 @@
     configuration.withCodeRanges = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 0
         codeLength: 27
@@ -68975,12 +78544,14 @@
         typeErasure: int
         fields
           final it @21
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             codeOffset: 17
             codeLength: 6
             type: int
         constructors
           @15
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             codeOffset: 16
             codeLength: 8
@@ -68992,6 +78563,7 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
 ''');
@@ -69006,10 +78578,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @24
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         documentationComment: /// Docs
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
@@ -69017,10 +78592,12 @@
         typeErasure: int
         fields
           final it @30
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         constructors
           @24
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @30
@@ -69028,6 +78605,7 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
 ''');
@@ -69043,19 +78621,24 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
         typeErasure: int
         fields
           final it @21
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
           static const foo @46
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -69065,9 +78648,11 @@
                 staticType: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
 ''');
@@ -69083,19 +78668,24 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
         typeErasure: int
         fields
           final it @21
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
           static const foo @42
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             shouldUseTypeForInitializerInference: false
@@ -69105,9 +78695,11 @@
                 staticType: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
           synthetic static get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
 ''');
@@ -69123,27 +78715,34 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
         typeErasure: int
         fields
           final it @21
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
           final foo @35
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
             shouldUseTypeForInitializerInference: false
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
 ''');
@@ -69161,22 +78760,26 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     extensionTypes
       A @32
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
         typeErasure: int
         fields
           final it @43
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             metadata
               Annotation
@@ -69189,6 +78792,7 @@
             type: int
         constructors
           @32
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @43
@@ -69196,6 +78800,7 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
 ''');
@@ -69211,26 +78816,33 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
         typeErasure: int
         fields
           final it @21
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
           get foo @37
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
 ''');
@@ -69247,20 +78859,26 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
       class B @17
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
       class C @28
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
           B
     extensionTypes
       X @64
+        reference: <thisLibrary>::<definingUnit>::@extensionType::X
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::X::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::X::@constructor::new
@@ -69270,10 +78888,12 @@
           B
         fields
           final it @68
+            reference: <thisLibrary>::<definingUnit>::@extensionType::X::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::X
             type: C
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::X::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::X
             returnType: C
 ''');
@@ -69288,10 +78908,13 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       hasImplementsSelfReference A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
@@ -69300,13 +78923,16 @@
           Object
         fields
           final it @21
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
       hasImplementsSelfReference B @56
+        reference: <thisLibrary>::<definingUnit>::@extensionType::B
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::B::@constructor::new
@@ -69315,10 +78941,12 @@
           Object
         fields
           final it @62
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             returnType: int
 ''');
@@ -69332,10 +78960,13 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       hasImplementsSelfReference A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
@@ -69344,10 +78975,12 @@
           Object
         fields
           final it @21
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
 ''');
@@ -69362,23 +78995,29 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
         typeErasure: num
         fields
           final it @21
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: num
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: num
       B @43
+        reference: <thisLibrary>::<definingUnit>::@extensionType::B
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::B::@constructor::new
@@ -69387,10 +79026,12 @@
           A
         fields
           final it @49
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             returnType: int
 ''');
@@ -69404,10 +79045,13 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
@@ -69416,10 +79060,12 @@
           num
         fields
           final it @21
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
 ''');
@@ -69433,20 +79079,25 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       X @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::X
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::X::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::X::@constructor::new
         typeErasure: int?
         fields
           final it @22
+            reference: <thisLibrary>::<definingUnit>::@extensionType::X::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::X
             type: int?
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::X::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::X
             returnType: int?
 ''');
@@ -69460,10 +79111,13 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @17
@@ -69473,10 +79127,12 @@
         typeErasure: T
         fields
           final it @22
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: T
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: T
 ''');
@@ -69491,10 +79147,13 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       X @33
+        reference: <thisLibrary>::<definingUnit>::@extensionType::X
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::X::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::X::@constructor::new
@@ -69503,14 +79162,17 @@
           num
         fields
           final it @39
+            reference: <thisLibrary>::<definingUnit>::@extensionType::X::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::X
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::X::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::X
             returnType: int
     typeAliases
       A @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         aliasedType: void
 ''');
   }
@@ -69533,16 +79195,20 @@
       ..withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::_it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
         typeErasure: int?
         fields
           final promotable _it @22
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::_it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int?
   fieldNameNonPromotabilityInfo
@@ -69567,16 +79233,19 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     extensionTypes
       A @37
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         metadata
           Annotation
@@ -69591,10 +79260,12 @@
         typeErasure: int
         fields
           final it @43
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         constructors
           @37
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @43
@@ -69602,6 +79273,7 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
 ''');
@@ -69617,24 +79289,30 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
         typeErasure: int
         fields
           final it @21
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
         methods
           foo @34
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional a @42
@@ -69653,27 +79331,34 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
         typeErasure: int
         fields
           final it @21
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
         methods
           foo @34
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               optionalNamed default a @43
+                reference: <thisLibrary>::<definingUnit>::@extensionType::A::@method::foo::@parameter::a
                 type: int
                 constantInitializer
                   IntegerLiteral
@@ -69691,10 +79376,13 @@
     configuration.withCodeRanges = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         codeOffset: 0
         codeLength: 21
@@ -69703,12 +79391,14 @@
         typeErasure: InvalidType
         fields
           final <empty> @17
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::<empty>
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             codeOffset: 17
             codeLength: 0
             type: InvalidType
         constructors
           @15
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             codeOffset: 16
             codeLength: 2
@@ -69720,6 +79410,7 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::<empty>
         accessors
           synthetic get <empty> @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::<empty>
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: InvalidType
 ''');
@@ -69733,10 +79424,13 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       notSimplyBounded A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @17
@@ -69747,10 +79441,12 @@
         typeErasure: int
         fields
           final it @34
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
 ''');
@@ -69766,26 +79462,33 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
         typeErasure: int
         fields
           final it @21
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: double
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
           set foo= @33
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional _ @44
@@ -69804,33 +79507,41 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       hasRepresentationSelfReference A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
         typeErasure: InvalidType
         fields
           final it @19
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: InvalidType
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: InvalidType
       hasRepresentationSelfReference B @42
+        reference: <thisLibrary>::<definingUnit>::@extensionType::B
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::B::@constructor::new
         typeErasure: InvalidType
         fields
           final it @46
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             type: InvalidType
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             returnType: InvalidType
 ''');
@@ -69846,33 +79557,41 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
         typeErasure: InvalidType
         fields
           final it @19
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: B
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: B
       hasRepresentationSelfReference B @42
+        reference: <thisLibrary>::<definingUnit>::@extensionType::B
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::B::@constructor::new
         typeErasure: InvalidType
         fields
           final it @52
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             type: InvalidType
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             returnType: InvalidType
 ''');
@@ -69886,20 +79605,25 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       hasRepresentationSelfReference A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
         typeErasure: InvalidType
         fields
           final it @19
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: InvalidType
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: InvalidType
 ''');
@@ -69915,33 +79639,41 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
         typeErasure: int
         fields
           final it @21
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
       B @44
+        reference: <thisLibrary>::<definingUnit>::@extensionType::B
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::B::@constructor::new
         typeErasure: int Function(int)
         fields
           final it @62
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             type: A Function(A)
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             returnType: A Function(A)
 ''');
@@ -69957,10 +79689,13 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @17
@@ -69970,23 +79705,28 @@
         typeErasure: T
         fields
           final it @22
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: T
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: T
       B @45
+        reference: <thisLibrary>::<definingUnit>::@extensionType::B
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::B::@constructor::new
         typeErasure: double
         fields
           final it @57
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             type: A<double>
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             returnType: A<double>
 ''');
@@ -70002,33 +79742,41 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
         typeErasure: int
         fields
           final it @21
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
       B @44
+        reference: <thisLibrary>::<definingUnit>::@extensionType::B
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::B::@constructor::new
         typeErasure: List<int>
         fields
           final it @54
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             type: List<A>
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::B::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::B
             returnType: List<A>
 ''');
@@ -70042,20 +79790,25 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         representation: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         primaryConstructor: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
         typeErasure: int
         fields
           final it @21
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: int
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: int
 ''');
@@ -70068,10 +79821,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     extensionTypes
       A @15
+        reference: <thisLibrary>::<definingUnit>::@extensionType::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @17
@@ -70084,10 +79840,12 @@
         typeErasure: Map<T, U>
         fields
           final it @45
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             type: Map<T, U>
         constructors
           @15
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             parameters
               requiredPositional final this.it @45
@@ -70095,6 +79853,7 @@
                 field: <thisLibrary>::<definingUnit>::@extensionType::A::@field::it
         accessors
           synthetic get it @-1
+            reference: <thisLibrary>::<definingUnit>::@extensionType::A::@getter::it
             enclosingElement: <thisLibrary>::<definingUnit>::@extensionType::A
             returnType: Map<T, U>
 ''');
@@ -70159,66 +79918,87 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       foo @57
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: void
         augmentation: <thisLibrary>::@augmentation::package:test/a1.dart::@functionAugmentation::foo
   augmentationImports
     package:test/a1.dart
+      reference: <thisLibrary>::@augmentation::package:test/a1.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a1.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a1.dart
         functions
           augment foo @96
+            reference: <thisLibrary>::@augmentation::package:test/a1.dart::@functionAugmentation::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a1.dart
             returnType: void
             augmentationTarget: <thisLibrary>::<definingUnit>::@function::foo
             augmentation: <thisLibrary>::@augmentation::package:test/a11.dart::@functionAugmentation::foo
       augmentationImports
         package:test/a11.dart
+          reference: <thisLibrary>::@augmentation::package:test/a11.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/a11.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/a11.dart
             functions
               augment foo @40
+                reference: <thisLibrary>::@augmentation::package:test/a11.dart::@functionAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a11.dart
                 returnType: void
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a1.dart::@functionAugmentation::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/a12.dart::@functionAugmentation::foo
         package:test/a12.dart
+          reference: <thisLibrary>::@augmentation::package:test/a12.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/a12.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/a12.dart
             functions
               augment foo @40
+                reference: <thisLibrary>::@augmentation::package:test/a12.dart::@functionAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a12.dart
                 returnType: void
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a11.dart::@functionAugmentation::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/a2.dart::@functionAugmentation::foo
     package:test/a2.dart
+      reference: <thisLibrary>::@augmentation::package:test/a2.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a2.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a2.dart
         functions
           augment foo @96
+            reference: <thisLibrary>::@augmentation::package:test/a2.dart::@functionAugmentation::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a2.dart
             returnType: void
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a12.dart::@functionAugmentation::foo
             augmentation: <thisLibrary>::@augmentation::package:test/a21.dart::@functionAugmentation::foo
       augmentationImports
         package:test/a21.dart
+          reference: <thisLibrary>::@augmentation::package:test/a21.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/a21.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/a21.dart
             functions
               augment foo @40
+                reference: <thisLibrary>::@augmentation::package:test/a21.dart::@functionAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a21.dart
                 returnType: void
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a2.dart::@functionAugmentation::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/a22.dart::@functionAugmentation::foo
         package:test/a22.dart
+          reference: <thisLibrary>::@augmentation::package:test/a22.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/a22.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/a22.dart
             functions
               augment foo @40
+                reference: <thisLibrary>::@augmentation::package:test/a22.dart::@functionAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a22.dart
                 returnType: void
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a21.dart::@functionAugmentation::foo
@@ -70238,7 +80018,6 @@
 class foo {}
 ''');
 
-    configuration.withReferences = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -70282,19 +80061,25 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       foo @30
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: void
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@functionAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         functions
           augment foo @42
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@functionAugmentation::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             returnType: void
             augmentationTarget: <thisLibrary>::<definingUnit>::@function::foo
@@ -70319,18 +80104,24 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         functions
           foo @34
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@function::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             returnType: void
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@functionAugmentation::foo
           augment foo @56
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@functionAugmentation::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             returnType: void
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@function::foo
@@ -70354,7 +80145,6 @@
 int get foo => 0;
 ''');
 
-    configuration.withReferences = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -70363,7 +80153,7 @@
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static foo @-1
-        reference: <thisLibrary>::<definingUnit>::@variable::foo
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
     accessors
@@ -70399,7 +80189,6 @@
 set foo(int _) {}
 ''');
 
-    configuration.withReferences = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -70408,7 +80197,7 @@
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static foo @-1
-        reference: <thisLibrary>::<definingUnit>::@variable::foo
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
     accessors
@@ -70447,7 +80236,6 @@
 int foo = 0;
 ''');
 
-    configuration.withReferences = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -70456,7 +80244,7 @@
     enclosingElement: <thisLibrary>
     topLevelVariables
       static foo @30
-        reference: <thisLibrary>::<definingUnit>::@variable::foo
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
@@ -70504,17 +80292,23 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class foo @31
+        reference: <thisLibrary>::<definingUnit>::@class::foo
         enclosingElement: <thisLibrary>::<definingUnit>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         accessors
           augment static get foo @45
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@getterAugmentation::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             returnType: int
             id: getter_0
@@ -70544,18 +80338,24 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       foo @30
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: void
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         accessors
           augment static get foo @45
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@getterAugmentation::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             returnType: int
             id: getter_0
@@ -70584,16 +80384,20 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static foo @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         id: variable_0
         getter: getter_0
     accessors
       static get foo @33
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
         id: getter_0
@@ -70601,10 +80405,13 @@
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@getterAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         accessors
           augment static get foo @45
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@getterAugmentation::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             returnType: int
             id: getter_1
@@ -70632,14 +80439,19 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         accessors
           augment static get foo @45
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@getterAugmentation::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             returnType: int
             id: getter_0
@@ -70666,16 +80478,20 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static foo @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         id: variable_0
         setter: setter_0
     accessors
       static set foo= @29
+        reference: <thisLibrary>::<definingUnit>::@setter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _ @37
@@ -70685,10 +80501,13 @@
         variable: variable_0
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         accessors
           augment static get foo @45
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@getterAugmentation::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             returnType: int
             id: getter_0
@@ -70717,10 +80536,13 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static foo @29
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
@@ -70729,12 +80551,14 @@
         setter: setter_0
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
         id: getter_0
         variable: variable_0
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@getterAugmentation::foo
       synthetic static set foo= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _foo @-1
@@ -70744,10 +80568,13 @@
         variable: variable_0
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         accessors
           augment static get foo @45
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@getterAugmentation::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             returnType: int
             id: getter_1
@@ -70778,20 +80605,27 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class foo @31
+        reference: <thisLibrary>::<definingUnit>::@class::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::foo::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         accessors
           augment static set foo= @41
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@setterAugmentation::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             parameters
               requiredPositional _ @49
@@ -70823,26 +80657,33 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static foo @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         id: variable_0
         getter: getter_0
     accessors
       static get foo @33
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
         id: getter_0
         variable: variable_0
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         accessors
           augment static set foo= @41
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@setterAugmentation::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             parameters
               requiredPositional _ @49
@@ -70873,14 +80714,19 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         accessors
           augment static set foo= @41
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@setterAugmentation::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             parameters
               requiredPositional _ @49
@@ -70909,16 +80755,20 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static foo @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         id: variable_0
         setter: setter_0
     accessors
       static set foo= @29
+        reference: <thisLibrary>::<definingUnit>::@setter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _ @37
@@ -70929,10 +80779,13 @@
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@setterAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         accessors
           augment static set foo= @41
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@setterAugmentation::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             parameters
               requiredPositional _ @49
@@ -70964,10 +80817,13 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static foo @29
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
@@ -70976,11 +80832,13 @@
         setter: setter_0
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
         id: getter_0
         variable: variable_0
       synthetic static set foo= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _foo @-1
@@ -70991,10 +80849,13 @@
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@setterAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         accessors
           augment static set foo= @41
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@setterAugmentation::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             parameters
               requiredPositional _ @49
@@ -71039,10 +80900,13 @@
       ..withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @17
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Object
         mixins
@@ -71052,6 +80916,7 @@
           Object
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -71072,14 +80937,18 @@
       ..withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         allSupertypes
           Object
       class B @33
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Object
         mixins
@@ -71090,6 +80959,7 @@
           Object
     mixins
       mixin M @17
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           A
@@ -71119,10 +80989,13 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
@@ -71132,19 +81005,25 @@
             Object
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @68
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
       augmentationImports
         package:test/b.dart
+          reference: <thisLibrary>::@augmentation::package:test/b.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/b.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             mixins
               augment mixin A @40
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
   exportedReferences
@@ -71175,7 +81054,6 @@
 import augment 'a.dart';
 ''');
 
-    configuration.withReferences = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -71255,25 +81133,32 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin B @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::B
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @68
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
             superclassConstraints
               Object
             methods
               foo1 @79
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@method::foo1
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 returnType: void
             augmented
@@ -71284,14 +81169,18 @@
                 <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A::@method::foo2
       augmentationImports
         package:test/b.dart
+          reference: <thisLibrary>::@augmentation::package:test/b.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/b.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             mixins
               augment mixin A @40
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 methods
                   foo2 @51
+                    reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A::@method::foo2
                     enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
                     returnType: void
 ''');
@@ -71315,16 +81204,20 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
           Object
         fields
           foo @41
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -71334,11 +81227,13 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@fieldAugmentation::foo
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             parameters
               requiredPositional _foo @-1
@@ -71356,14 +81251,18 @@
             <thisLibrary>::<definingUnit>::@mixin::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             fields
               augment foo @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -71398,16 +81297,20 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @56
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
           Object
         fields
           foo @66
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -71417,11 +81320,13 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@fieldAugmentation::foo
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             parameters
               requiredPositional _foo @-1
@@ -71439,15 +81344,19 @@
             <thisLibrary>::<definingUnit>::@mixin::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
             fields
               augment foo @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -71455,14 +81364,18 @@
                 augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A::@field::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A::@fieldAugmentation::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             fields
               augment foo @61
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -71497,16 +81410,20 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @56
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
           Object
         fields
           foo @66
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -71516,12 +81433,14 @@
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A::@fieldAugmentation::foo
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: int
             id: getter_0
             variable: field_0
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@getterAugmentation::foo
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             parameters
               requiredPositional _foo @-1
@@ -71539,29 +81458,37 @@
             <thisLibrary>::<definingUnit>::@mixin::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 returnType: int
                 id: getter_1
                 variable: field_0
                 augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A::@getter::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             fields
               augment foo @61
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -71596,16 +81523,20 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @56
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
           Object
         fields
           foo @66
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -71615,11 +81546,13 @@
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A::@fieldAugmentation::foo
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             parameters
               requiredPositional _foo @-1
@@ -71638,15 +81571,19 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@setterAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
             accessors
               augment set foo= @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@setterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 parameters
                   requiredPositional _ @69
@@ -71656,14 +81593,18 @@
                 variable: field_0
                 augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A::@setter::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             fields
               augment foo @61
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -71690,16 +81631,20 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
           Object
         fields
           foo @41
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -71709,11 +81654,13 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@fieldAugmentation::foo
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             parameters
               requiredPositional _foo @-1
@@ -71731,14 +81678,18 @@
             <thisLibrary>::<definingUnit>::@mixin::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             fields
               augment foo @64
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 type: double
                 shouldUseTypeForInitializerInference: true
@@ -71767,16 +81718,20 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
           Object
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             type: int
             id: field_0
@@ -71784,6 +81739,7 @@
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@fieldAugmentation::foo
         accessors
           get foo @45
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: int
             id: getter_0
@@ -71797,14 +81753,18 @@
             <thisLibrary>::<definingUnit>::@mixin::A::@getter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             fields
               augment foo @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@fieldAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -71831,16 +81791,20 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
           Object
         fields
           foo1 @41
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -71849,11 +81813,13 @@
             setter: setter_0
         accessors
           synthetic get foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic set foo1= @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@setter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             parameters
               requiredPositional _foo1 @-1
@@ -71874,14 +81840,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@setter::foo2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             fields
               foo2 @53
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 type: int
                 shouldUseTypeForInitializerInference: true
@@ -71890,11 +81860,13 @@
                 setter: setter_1
             accessors
               synthetic get foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@getter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 returnType: int
                 id: getter_1
                 variable: field_1
               synthetic set foo2= @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@setter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 parameters
                   requiredPositional _foo2 @-1
@@ -71923,10 +81895,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T1 @33
@@ -71936,6 +81911,7 @@
           Object
         fields
           foo1 @44
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             type: T1
             id: field_0
@@ -71943,11 +81919,13 @@
             setter: setter_0
         accessors
           synthetic get foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: T1
             id: getter_0
             variable: field_0
           synthetic set foo1= @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@setter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             parameters
               requiredPositional _foo1 @-1
@@ -71974,10 +81952,13 @@
               augmentationSubstitution: {T2: T1}
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @45
@@ -71985,6 +81966,7 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             fields
               foo2 @56
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 type: T2
                 id: field_1
@@ -71992,11 +81974,13 @@
                 setter: setter_1
             accessors
               synthetic get foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@getter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 returnType: T2
                 id: getter_1
                 variable: field_1
               synthetic set foo2= @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@setter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 parameters
                   requiredPositional _foo2 @-1
@@ -72025,22 +82009,27 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
           Object
         fields
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             type: int
             id: field_0
             getter: getter_0
         accessors
           get foo1 @45
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: int
             id: getter_0
@@ -72056,20 +82045,25 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@getter::foo2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             fields
               synthetic foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 type: int
                 id: field_1
                 getter: getter_1
             accessors
               get foo2 @57
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@getter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 returnType: int
                 id: getter_1
@@ -72095,10 +82089,13 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T1 @33
@@ -72108,12 +82105,14 @@
           Object
         fields
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             type: T1
             id: field_0
             getter: getter_0
         accessors
           abstract get foo1 @48
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: T1
             id: getter_0
@@ -72133,10 +82132,13 @@
               augmentationSubstitution: {T2: T1}
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @45
@@ -72144,12 +82146,14 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             fields
               synthetic foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 type: T2
                 id: field_1
                 getter: getter_1
             accessors
               abstract get foo2 @60
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@getter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 returnType: T2
                 id: getter_1
@@ -72175,16 +82179,20 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
           Object
         fields
           foo @41
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -72193,12 +82201,14 @@
             setter: setter_0
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: int
             id: getter_0
             variable: field_0
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@getterAugmentation::foo
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             parameters
               requiredPositional _foo @-1
@@ -72216,14 +82226,18 @@
             <thisLibrary>::<definingUnit>::@mixin::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 returnType: int
                 id: getter_1
@@ -72258,16 +82272,20 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @56
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
           Object
         fields
           foo @66
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -72276,12 +82294,14 @@
             setter: setter_0
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: int
             id: getter_0
             variable: field_0
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@getterAugmentation::foo
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             parameters
               requiredPositional _foo @-1
@@ -72299,15 +82319,19 @@
             <thisLibrary>::<definingUnit>::@mixin::A::@setter::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 returnType: int
                 id: getter_1
@@ -72315,14 +82339,18 @@
                 augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A::@getter::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A::@getterAugmentation::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
                 returnType: int
                 id: getter_2
@@ -72350,33 +82378,40 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
           Object
         fields
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             type: int
             id: field_0
             getter: getter_0
           synthetic foo2 @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@field::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             type: int
             id: field_1
             getter: getter_1
         accessors
           get foo1 @45
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@getter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: int
             id: getter_0
             variable: field_0
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@getterAugmentation::foo1
           get foo2 @66
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@getter::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: int
             id: getter_1
@@ -72392,14 +82427,18 @@
             <thisLibrary>::<definingUnit>::@mixin::A::@getter::foo2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             accessors
               augment get foo1 @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@getterAugmentation::foo1
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 returnType: int
                 id: getter_2
@@ -72434,22 +82473,27 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @56
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
           Object
         fields
           synthetic foo @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             type: int
             id: field_0
             getter: getter_0
         accessors
           get foo @70
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: int
             id: getter_0
@@ -72464,15 +82508,19 @@
             <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A::@getterAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 returnType: int
                 id: getter_1
@@ -72480,14 +82528,18 @@
                 augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A::@getter::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A::@getterAugmentation::foo
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             accessors
               augment get foo @65
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A::@getterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
                 returnType: int
                 id: getter_2
@@ -72511,16 +82563,21 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class I1 @56
+        reference: <thisLibrary>::<definingUnit>::@class::I1
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I1
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
@@ -72535,16 +82592,21 @@
             I2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           class I2 @68
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             interfaces
@@ -72574,16 +82636,21 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class I1 @56
+        reference: <thisLibrary>::<definingUnit>::@class::I1
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I1
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
@@ -72599,16 +82666,21 @@
             I3
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           class I2 @93
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
         mixins
           augment mixin A @68
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
@@ -72616,16 +82688,21 @@
               I2
       augmentationImports
         package:test/b.dart
+          reference: <thisLibrary>::@augmentation::package:test/b.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/b.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             classes
               class I3 @65
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@class::I3
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 constructors
                   synthetic @-1
+                    reference: <thisLibrary>::@augmentation::package:test/b.dart::@class::I3::@constructor::new
                     enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@class::I3
             mixins
               augment mixin A @40
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 interfaces
@@ -72650,16 +82727,20 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
           Object
         methods
           foo @42
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: void
         augmented
@@ -72670,14 +82751,18 @@
             <thisLibrary>::<definingUnit>::@mixin::A::@method::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             methods
               bar @54
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@method::bar
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 returnType: void
 ''');
@@ -72701,20 +82786,25 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
           Object
         methods
           foo1 @42
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@method::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: void
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@methodAugmentation::foo1
           foo2 @59
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@method::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: void
         augmented
@@ -72725,14 +82815,18 @@
             <thisLibrary>::<definingUnit>::@mixin::A::@method::foo2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             methods
               augment foo1 @62
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@methodAugmentation::foo1
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 returnType: void
                 augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A::@method::foo1
@@ -72764,16 +82858,20 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
           Object
         methods
           foo @42
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: void
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@methodAugmentation::foo
@@ -72784,29 +82882,37 @@
             <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A::@methodAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @68
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
             methods
               augment foo @87
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@methodAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 returnType: void
                 augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A::@method::foo
                 augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A::@methodAugmentation::foo
       augmentationImports
         package:test/b.dart
+          reference: <thisLibrary>::@augmentation::package:test/b.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/b.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             mixins
               augment mixin A @40
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 methods
                   augment foo @59
+                    reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A::@methodAugmentation::foo
                     enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
                     returnType: void
                     augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@methodAugmentation::foo
@@ -72830,10 +82936,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @33
@@ -72843,6 +82952,7 @@
           Object
         methods
           foo @42
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: T
         augmented
@@ -72855,10 +82965,13 @@
             <thisLibrary>::<definingUnit>::@mixin::A::@method::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @45
@@ -72866,6 +82979,7 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             methods
               bar @56
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@method::bar
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 returnType: T2
 ''');
@@ -72888,10 +83002,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @33
@@ -72901,6 +83018,7 @@
           Object
         methods
           foo @42
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: T
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@methodAugmentation::foo
@@ -72913,10 +83031,13 @@
               augmentationSubstitution: {T2: T}
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @45
@@ -72924,6 +83045,7 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             methods
               augment foo @64
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@methodAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 returnType: T2
                 augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A::@method::foo
@@ -72948,20 +83070,25 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
           Object
         methods
           foo @42
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: void
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@methodAugmentation::foo
           bar @58
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@method::bar
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: void
         augmented
@@ -72974,10 +83101,13 @@
               augmentationSubstitution: {T: InvalidType}
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T @45
@@ -72985,6 +83115,7 @@
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             methods
               augment foo @65
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@methodAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 returnType: void
                 augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A::@method::foo
@@ -73009,22 +83140,27 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
           Object
         fields
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             type: int
             id: field_0
             setter: setter_0
         accessors
           set foo1= @41
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@setter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             parameters
               requiredPositional _ @50
@@ -73043,20 +83179,25 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@setter::foo2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             fields
               synthetic foo2 @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@field::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 type: int
                 id: field_1
                 setter: setter_1
             accessors
               set foo2= @53
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@setter::foo2
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 parameters
                   requiredPositional _ @62
@@ -73085,16 +83226,20 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
           Object
         fields
           foo @41
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -73103,11 +83248,13 @@
             setter: setter_0
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             returnType: int
             id: getter_0
             variable: field_0
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             parameters
               requiredPositional _foo @-1
@@ -73126,14 +83273,18 @@
             <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@setterAugmentation::foo
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             accessors
               augment set foo= @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@setterAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 parameters
                   requiredPositional _ @69
@@ -73164,27 +83315,33 @@
     configuration.withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
           Object
         fields
           synthetic foo1 @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@field::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             type: int
             id: field_0
             setter: setter_0
           synthetic foo2 @-1
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@field::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             type: int
             id: field_1
             setter: setter_1
         accessors
           set foo1= @41
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@setter::foo1
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             parameters
               requiredPositional _ @50
@@ -73194,6 +83351,7 @@
             variable: field_0
             augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@setterAugmentation::foo1
           set foo2= @62
+            reference: <thisLibrary>::<definingUnit>::@mixin::A::@setter::foo2
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::A
             parameters
               requiredPositional _ @71
@@ -73212,14 +83370,18 @@
             <thisLibrary>::<definingUnit>::@mixin::A::@setter::foo2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             accessors
               augment set foo1= @61
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A::@setterAugmentation::foo1
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 parameters
                   requiredPositional _ @70
@@ -73246,16 +83408,21 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class B1 @48
+        reference: <thisLibrary>::<definingUnit>::@class::B1
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B1
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
@@ -73266,16 +83433,21 @@
             B2
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           class B2 @60
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::B2
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::B2::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::B2
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             superclassConstraints
@@ -73305,16 +83477,21 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class I1 @48
+        reference: <thisLibrary>::<definingUnit>::@class::I1
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I1
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
@@ -73326,16 +83503,21 @@
             I3
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           class I2 @85
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
         mixins
           augment mixin A @68
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
@@ -73343,16 +83525,21 @@
               I2
       augmentationImports
         package:test/b.dart
+          reference: <thisLibrary>::@augmentation::package:test/b.dart
           definingUnit
+            reference: <thisLibrary>::@augmentation::package:test/b.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             classes
               class I3 @57
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@class::I3
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 constructors
                   synthetic @-1
+                    reference: <thisLibrary>::@augmentation::package:test/b.dart::@class::I3::@constructor::new
                     enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@class::I3
             mixins
               augment mixin A @40
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::A
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
                 augmentationTarget: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
                 superclassConstraints
@@ -73374,10 +83561,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         augmented
@@ -73385,16 +83575,21 @@
             B
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           class B @59
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::B::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::B
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
             superclassConstraints
@@ -73417,16 +83612,21 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class I1 @51
+        reference: <thisLibrary>::<definingUnit>::@class::I1
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I1
     mixins
       mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @33
@@ -73440,19 +83640,24 @@
             I2<T>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         classes
           class I2 @68
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant E @71
                 defaultType: dynamic
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart::@class::I2
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T2 @45
@@ -73483,9 +83688,7 @@
 mixin A {}
 ''');
 
-    configuration
-      ..withConstructors = false
-      ..withReferences = true;
+    configuration.withConstructors = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -73542,7 +83745,6 @@
 mixin A {}
 ''');
 
-    configuration.withReferences = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -73610,16 +83812,19 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     mixins
       mixin B @49
+        reference: <thisLibrary>::<definingUnit>::@mixin::B
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::B
         superclassConstraints
@@ -73631,14 +83836,18 @@
             <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::B::@method::foo
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         mixins
           augment mixin B @43
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::B
             methods
               foo @49
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::B::@method::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::B
                 parameters
                   requiredPositional a @53
@@ -73670,16 +83879,20 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin B @32
+        reference: <thisLibrary>::<definingUnit>::@mixin::B
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::B
         superclassConstraints
           Object
         methods
           foo @38
+            reference: <thisLibrary>::<definingUnit>::@mixin::B::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::B
             parameters
               requiredPositional a @42
@@ -73694,16 +83907,19 @@
             <thisLibrary>::<definingUnit>::@mixin::B::@method::foo
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       imports
         package:test/a.dart
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         libraryImports
           package:test/a.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         mixins
           augment mixin B @60
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::B
             interfaces
@@ -73734,14 +83950,18 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       mixin B @32
+        reference: <thisLibrary>::<definingUnit>::@mixin::B
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::B
         methods
           foo @38
+            reference: <thisLibrary>::<definingUnit>::@mixin::B::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::B
             parameters
               requiredPositional a @42
@@ -73754,16 +83974,19 @@
             <thisLibrary>::<definingUnit>::@mixin::B::@method::foo
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       imports
         package:test/a.dart
           enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         libraryImports
           package:test/a.dart
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         mixins
           augment mixin B @60
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::B
             superclassConstraints
@@ -73796,22 +84019,26 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     mixins
       mixin B @49
+        reference: <thisLibrary>::<definingUnit>::@mixin::B
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::B
         superclassConstraints
           A
         methods
           foo @60
+            reference: <thisLibrary>::<definingUnit>::@mixin::B::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@mixin::B
             parameters
               requiredPositional a @64
@@ -73825,14 +84052,18 @@
             <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::B::@methodAugmentation::foo
   augmentationImports
     package:test/b.dart
+      reference: <thisLibrary>::@augmentation::package:test/b.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/b.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
         mixins
           augment mixin B @43
+            reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::B
             methods
               augment foo @57
+                reference: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::B::@methodAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/b.dart::@mixinAugmentation::B
                 parameters
                   requiredPositional a @61
@@ -73855,10 +84086,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       base mixin A @36
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
         superclassConstraints
@@ -73868,10 +84102,13 @@
             Object
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment base mixin A @48
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@mixin::A
 ''');
@@ -73886,17 +84123,22 @@
     configuration.withAugmentedWithoutAugmentation = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class I @30
+        reference: <thisLibrary>::<definingUnit>::@class::I
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I
         augmented
     mixins
       mixin A @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -73919,17 +84161,22 @@
     configuration.withAugmentedWithoutAugmentation = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class B @22
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         augmented
     mixins
       mixin A @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           B
@@ -73952,10 +84199,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     mixins
       notSimplyBounded mixin A @31
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @33
@@ -73969,10 +84219,13 @@
             Object
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         mixins
           augment mixin A @43
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@mixinAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             typeParameters
               covariant T @45
@@ -74014,20 +84267,27 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         topLevelVariables
           augment static A @41
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@topLevelVariableAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             type: int
             shouldUseTypeForInitializerInference: true
@@ -74037,11 +84297,13 @@
             augmentationTargetAny: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic static get A @-1
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@getter::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             returnType: int
             id: getter_0
             variable: variable_0
           synthetic static set A= @-1
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@setter::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             parameters
               requiredPositional _A @-1
@@ -74074,18 +84336,24 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       foo @30
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: void
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         topLevelVariables
           augment static foo @41
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@topLevelVariableAugmentation::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             type: int
             shouldUseTypeForInitializerInference: true
@@ -74095,11 +84363,13 @@
             augmentationTargetAny: <thisLibrary>::<definingUnit>::@function::foo
         accessors
           synthetic static get foo @-1
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@getter::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             returnType: int
             id: getter_0
             variable: variable_0
           synthetic static set foo= @-1
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@setter::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             parameters
               requiredPositional _foo @-1
@@ -74132,26 +84402,33 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static foo @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         id: variable_0
         getter: getter_0
     accessors
       static get foo @33
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
         id: getter_0
         variable: variable_0
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         topLevelVariables
           augment static foo @41
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@topLevelVariableAugmentation::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             type: int
             shouldUseTypeForInitializerInference: true
@@ -74161,11 +84438,13 @@
             augmentationTargetAny: <thisLibrary>::<definingUnit>::@getter::foo
         accessors
           synthetic static get foo @-1
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@getter::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             returnType: int
             id: getter_1
             variable: variable_1
           synthetic static set foo= @-1
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@setter::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             parameters
               requiredPositional _foo @-1
@@ -74198,16 +84477,20 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static foo @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         id: variable_0
         setter: setter_0
     accessors
       static set foo= @29
+        reference: <thisLibrary>::<definingUnit>::@setter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _ @37
@@ -74217,10 +84500,13 @@
         variable: variable_0
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         topLevelVariables
           augment static foo @41
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@topLevelVariableAugmentation::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             type: int
             shouldUseTypeForInitializerInference: true
@@ -74230,11 +84516,13 @@
             augmentationTargetAny: <thisLibrary>::<definingUnit>::@setter::foo
         accessors
           synthetic static get foo @-1
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@getter::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             returnType: int
             id: getter_0
             variable: variable_1
           synthetic static set foo= @-1
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@setter::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             parameters
               requiredPositional _foo @-1
@@ -74267,24 +84555,29 @@
       ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static foo @29
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
         id: variable_0
         getter: getter_0
         setter: setter_0
-        augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@variableAugmentation::foo
+        augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@topLevelVariableAugmentation::foo
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
         id: getter_0
         variable: variable_0
       synthetic static set foo= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _foo @-1
@@ -74294,24 +84587,29 @@
         variable: variable_0
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         topLevelVariables
           augment static foo @41
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@topLevelVariableAugmentation::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             type: int
             shouldUseTypeForInitializerInference: true
             id: variable_1
             getter: getter_1
             setter: setter_1
-            augmentationTarget: <thisLibrary>::<definingUnit>::@variable::foo
+            augmentationTarget: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         accessors
           synthetic static get foo @-1
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@getter::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             returnType: int
             id: getter_1
             variable: variable_1
           synthetic static set foo= @-1
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@setter::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             parameters
               requiredPositional _foo @-1
@@ -74341,10 +84639,13 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static const foo @35
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: true
@@ -74352,17 +84653,21 @@
           IntegerLiteral
             literal: 0 @41
             staticType: int
-        augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@variableAugmentation::foo
+        augmentation: <thisLibrary>::@augmentation::package:test/a.dart::@topLevelVariableAugmentation::foo
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         topLevelVariables
           augment static const foo @47
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@topLevelVariableAugmentation::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             type: int
             shouldUseTypeForInitializerInference: true
@@ -74370,7 +84675,7 @@
               BinaryExpression
                 leftOperand: AugmentedExpression
                   augmentedKeyword: augmented @53
-                  element: <thisLibrary>::<definingUnit>::@variable::foo
+                  element: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
                   staticType: int
                 operator: + @63
                 rightOperand: IntegerLiteral
@@ -74379,9 +84684,10 @@
                 staticElement: dart:core::<definingUnit>::@class::num::@method::+
                 staticInvokeType: num Function(num)
                 staticType: int
-            augmentationTarget: <thisLibrary>::<definingUnit>::@variable::foo
+            augmentationTarget: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         accessors
           synthetic static get foo @-1
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@getter::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
             returnType: int
 ''');
@@ -74417,17 +84723,23 @@
     configuration.withConstructors = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @31
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         typeAliases
           augment A @45
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@typeAliasAugmentation::A
             aliasedType: int
             augmentationTargetAny: <thisLibrary>::<definingUnit>::@class::A
 ''');
@@ -74446,18 +84758,24 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     functions
       A @30
+        reference: <thisLibrary>::<definingUnit>::@function::A
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: void
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         typeAliases
           augment A @45
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@typeAliasAugmentation::A
             aliasedType: int
             augmentationTargetAny: <thisLibrary>::<definingUnit>::@function::A
 ''');
@@ -74476,22 +84794,29 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static A @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::A
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
     accessors
       static get A @33
+        reference: <thisLibrary>::<definingUnit>::@getter::A
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         typeAliases
           augment A @45
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@typeAliasAugmentation::A
             aliasedType: int
             augmentationTargetAny: <thisLibrary>::<definingUnit>::@getter::A
 ''');
@@ -74510,14 +84835,19 @@
     configuration.withExportScope = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         typeAliases
           augment A @45
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@typeAliasAugmentation::A
             aliasedType: int
   exportedReferences
   exportNamespace
@@ -74537,14 +84867,18 @@
 
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       synthetic static A @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::A
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
     accessors
       static set A= @29
+        reference: <thisLibrary>::<definingUnit>::@setter::A
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _ @35
@@ -74552,10 +84886,13 @@
         returnType: void
   augmentationImports
     package:test/a.dart
+      reference: <thisLibrary>::@augmentation::package:test/a.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/a.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/a.dart
         typeAliases
           augment A @45
+            reference: <thisLibrary>::@augmentation::package:test/a.dart::@typeAliasAugmentation::A
             aliasedType: int
             augmentationTargetAny: <thisLibrary>::<definingUnit>::@setter::A
 ''');
@@ -74572,9 +84909,7 @@
 typedef A = int;
 ''');
 
-    configuration
-      ..withExportScope = true
-      ..withReferences = true;
+    configuration.withExportScope = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
diff --git a/pkg/analyzer/test/src/summary/macro_test.dart b/pkg/analyzer/test/src/summary/macro_test.dart
index f93212d..9462331 100644
--- a/pkg/analyzer/test/src/summary/macro_test.dart
+++ b/pkg/analyzer/test/src/summary/macro_test.dart
@@ -124,16 +124,19 @@
     // `A1` and `A2` declarations are incomplete.
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/order.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/order.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A1 @70
+        reference: <thisLibrary>::<definingUnit>::@class::A1
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           DeclarationsIntrospectionCycleDiagnostic
@@ -149,6 +152,7 @@
                 annotationIndex: 0
                 introspectedElement: <thisLibrary>::<definingUnit>::@class::A1
       class A2 @125
+        reference: <thisLibrary>::<definingUnit>::@class::A2
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           DeclarationsIntrospectionCycleDiagnostic
@@ -164,6 +168,7 @@
                 annotationIndex: 0
                 introspectedElement: <thisLibrary>::<definingUnit>::@class::A1
       class A3 @222
+        reference: <thisLibrary>::<definingUnit>::@class::A3
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           DeclarationsIntrospectionCycleDiagnostic
@@ -271,16 +276,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/order.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/order.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A1 @64
+        reference: <thisLibrary>::<definingUnit>::@class::A1
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           DeclarationsIntrospectionCycleDiagnostic
@@ -296,6 +304,7 @@
                 annotationIndex: 0
                 introspectedElement: <thisLibrary>::<definingUnit>::@class::A1
       class A2 @113
+        reference: <thisLibrary>::<definingUnit>::@class::A2
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           DeclarationsIntrospectionCycleDiagnostic
@@ -311,6 +320,7 @@
                 annotationIndex: 0
                 introspectedElement: <thisLibrary>::<definingUnit>::@class::A1
       class A3 @198
+        reference: <thisLibrary>::<definingUnit>::@class::A3
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           DeclarationsIntrospectionCycleDiagnostic
@@ -417,16 +427,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/order.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/order.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A1 @65
+        reference: <thisLibrary>::<definingUnit>::@class::A1
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           DeclarationsIntrospectionCycleDiagnostic
@@ -442,6 +455,7 @@
                 annotationIndex: 0
                 introspectedElement: <thisLibrary>::<definingUnit>::@class::A1
       class A2 @115
+        reference: <thisLibrary>::<definingUnit>::@class::A2
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           DeclarationsIntrospectionCycleDiagnostic
@@ -457,6 +471,7 @@
                 annotationIndex: 0
                 introspectedElement: <thisLibrary>::<definingUnit>::@class::A1
       class A3 @202
+        reference: <thisLibrary>::<definingUnit>::@class::A3
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           DeclarationsIntrospectionCycleDiagnostic
@@ -505,16 +520,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/order.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/order.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A1 @65
+        reference: <thisLibrary>::<definingUnit>::@class::A1
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           DeclarationsIntrospectionCycleDiagnostic
@@ -530,6 +548,7 @@
                 annotationIndex: 0
                 introspectedElement: <thisLibrary>::<definingUnit>::@class::A2
       class A2 @115
+        reference: <thisLibrary>::<definingUnit>::@class::A2
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           DeclarationsIntrospectionCycleDiagnostic
@@ -545,6 +564,7 @@
                 annotationIndex: 0
                 introspectedElement: <thisLibrary>::<definingUnit>::@class::A2
       class A3 @165
+        reference: <thisLibrary>::<definingUnit>::@class::A3
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           DeclarationsIntrospectionCycleDiagnostic
@@ -623,11 +643,13 @@
     configuration.forOrder();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/order.dart
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -652,11 +674,13 @@
     configuration.forOrder();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/order.dart
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -683,11 +707,13 @@
     configuration.forOrder();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/order.dart
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -710,11 +736,13 @@
     configuration.forOrder();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/order.dart
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -739,11 +767,13 @@
     configuration.forOrder();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/order.dart
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -794,11 +824,13 @@
     configuration.forOrder();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/order.dart
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -823,11 +855,13 @@
     configuration.forOrder();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/order.dart
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -852,11 +886,13 @@
     configuration.forOrder();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/order.dart
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -881,11 +917,13 @@
     configuration.forOrder();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/order.dart
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -912,11 +950,13 @@
     configuration.forOrder();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/order.dart
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -939,11 +979,13 @@
     configuration.forOrder();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/order.dart
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -968,11 +1010,13 @@
     configuration.forOrder();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/order.dart
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -1013,16 +1057,19 @@
       hasErrors: true,
       expected: r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/arguments_text.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/arguments_text.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @76
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           ArgumentMacroDiagnostic
@@ -2846,9 +2893,7 @@
 class A {}
 ''');
 
-    configuration
-      ..withConstructors = false
-      ..withReferences = true;
+    configuration.withConstructors = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -2980,9 +3025,7 @@
 }
 ''');
 
-    configuration
-      ..withMetadata = false
-      ..withReferences = true;
+    configuration.withMetadata = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -3057,9 +3100,7 @@
 class A {}
 ''');
 
-    configuration
-      ..withMetadata = false
-      ..withReferences = true;
+    configuration.withMetadata = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -3119,9 +3160,7 @@
 class A {}
 ''');
 
-    configuration
-      ..withMetadata = false
-      ..withReferences = true;
+    configuration.withMetadata = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -3181,8 +3220,7 @@
 
     configuration
       ..withConstructors = false
-      ..withMetadata = false
-      ..withReferences = true;
+      ..withMetadata = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -3256,8 +3294,7 @@
 
     configuration
       ..withConstructors = false
-      ..withMetadata = false
-      ..withReferences = true;
+      ..withMetadata = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -3322,8 +3359,7 @@
 
     configuration
       ..withConstructors = false
-      ..withMetadata = false
-      ..withReferences = true;
+      ..withMetadata = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -3384,8 +3420,7 @@
 
     configuration
       ..withConstructors = false
-      ..withMetadata = false
-      ..withReferences = true;
+      ..withMetadata = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -3461,6 +3496,7 @@
       ..withConstructors = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -3468,6 +3504,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -3483,18 +3520,22 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           augment class B @99
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::B
             constructors
               @105
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 parameters
                   optionalPositional default x @108
@@ -3531,6 +3572,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -3538,6 +3580,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -3553,18 +3596,22 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           augment class B @99
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::B
             methods
               foo @110
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@method::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 parameters
                   optionalPositional default x @115
@@ -3602,6 +3649,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -3609,6 +3657,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -3624,18 +3673,22 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           augment class B @99
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::B
             methods
               foo @110
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@method::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 parameters
                   optionalPositional default x @126
@@ -3676,6 +3729,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -3683,6 +3737,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -3698,18 +3753,22 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           augment class B @99
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::B
             methods
               foo @110
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@method::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 parameters
                   requiredPositional x @125
@@ -3750,6 +3809,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -3757,6 +3817,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -3772,22 +3833,27 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           augment class B @99
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::B
             fields
               synthetic foo @-1
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@field::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 type: dynamic
             accessors
               set foo= @109
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@setter::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 parameters
                   requiredPositional x @124
@@ -3828,6 +3894,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -3835,6 +3902,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -3850,18 +3918,22 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           augment class B @99
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::B
             fields
               static const x @118
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@field::x
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 type: int
                 shouldUseTypeForInitializerInference: false
@@ -3880,6 +3952,7 @@
                     staticType: int
             accessors
               synthetic static get x @-1
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@getter::x
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 returnType: int
 ''');
@@ -3903,6 +3976,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -3910,6 +3984,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -3925,18 +4000,22 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           augment class B @99
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::B
             fields
               final x @111
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@field::x
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 type: int
                 shouldUseTypeForInitializerInference: false
@@ -3955,6 +4034,7 @@
                     staticType: int
             accessors
               synthetic get x @-1
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@getter::x
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 returnType: int
 ''');
@@ -3976,6 +4056,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -3983,6 +4064,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -3998,23 +4080,28 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           augment class B @99
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::B
             fields
               final x @111
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@field::x
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 type: int
                 shouldUseTypeForInitializerInference: false
             accessors
               synthetic get x @-1
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@getter::x
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 returnType: int
 ''');
@@ -4036,6 +4123,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -4043,6 +4131,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -4058,18 +4147,22 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           augment class B @99
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::B
             fields
               static const x @118
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@field::x
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 type: Type
                 shouldUseTypeForInitializerInference: false
@@ -4094,6 +4187,7 @@
                     staticType: Type
             accessors
               synthetic static get x @-1
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@getter::x
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 returnType: Type
 ''');
@@ -4115,6 +4209,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -4122,6 +4217,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -4135,14 +4231,17 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         topLevelVariables
           static const x @91
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@topLevelVariable::x
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             type: int
             shouldUseTypeForInitializerInference: false
@@ -4161,6 +4260,7 @@
                 staticType: int
         accessors
           synthetic static get x @-1
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@accessor::x
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             returnType: int
 ''');
@@ -4183,6 +4283,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -4190,6 +4291,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -4203,14 +4305,17 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         topLevelVariables
           static const x @91
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@topLevelVariable::x
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             type: int
             shouldUseTypeForInitializerInference: false
@@ -4246,6 +4351,7 @@
                 staticType: int
         accessors
           synthetic static get x @-1
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@accessor::x
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             returnType: int
 ''');
@@ -4274,6 +4380,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -4281,6 +4388,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -4296,14 +4404,17 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         topLevelVariables
           static const x @104
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@topLevelVariable::x
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             metadata
               Annotation
@@ -4340,6 +4451,7 @@
                 staticElement: package:test/a.dart::<definingUnit>::@getter::a
                 staticType: int
           static const y @119
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@topLevelVariable::y
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             metadata
               Annotation
@@ -4377,9 +4489,11 @@
                 staticType: int
         accessors
           synthetic static get x @-1
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@accessor::x
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             returnType: int
           synthetic static get y @-1
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@accessor::y
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             returnType: int
 ''');
@@ -4401,6 +4515,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -4408,6 +4523,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -4421,14 +4537,17 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         topLevelVariables
           static const x @91
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@topLevelVariable::x
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             type: Type
             shouldUseTypeForInitializerInference: false
@@ -4453,6 +4572,7 @@
                 staticType: Type
         accessors
           synthetic static get x @-1
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@accessor::x
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             returnType: Type
 ''');
@@ -4478,6 +4598,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -4485,6 +4606,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -4499,14 +4621,17 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           class C @104
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@class::C
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             metadata
               Annotation
@@ -4552,6 +4677,7 @@
       ..withConstructors = true;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -4559,6 +4685,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -4575,18 +4702,22 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           augment class B @99
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::B
             constructors
               named @122
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@constructor::named
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 metadata
                   Annotation
@@ -4632,6 +4763,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -4639,6 +4771,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -4655,18 +4788,22 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           augment class B @99
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::B
             fields
               final foo @130
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@field::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 metadata
                   Annotation
@@ -4691,6 +4828,7 @@
                 shouldUseTypeForInitializerInference: true
             accessors
               synthetic get foo @-1
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@getter::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 returnType: int
 ''');
@@ -4716,6 +4854,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -4723,6 +4862,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -4739,18 +4879,22 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           augment class B @99
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::B
             fields
               final foo @130
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@field::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 metadata
                   Annotation
@@ -4774,6 +4918,7 @@
                 type: int
                 shouldUseTypeForInitializerInference: true
               final bar @139
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@field::bar
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 metadata
                   Annotation
@@ -4798,9 +4943,11 @@
                 shouldUseTypeForInitializerInference: true
             accessors
               synthetic get foo @-1
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@getter::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 returnType: int
               synthetic get bar @-1
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@getter::bar
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 returnType: int
 ''');
@@ -4826,6 +4973,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -4833,6 +4981,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -4849,22 +4998,27 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           augment class B @99
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::B
             fields
               synthetic foo @-1
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@field::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 type: int
             accessors
               get foo @128
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@getter::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 metadata
                   Annotation
@@ -4909,6 +5063,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -4916,6 +5071,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -4932,18 +5088,22 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           augment class B @99
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::B
             methods
               foo @125
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@method::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 metadata
                   Annotation
@@ -4988,6 +5148,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -4995,6 +5156,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -5011,22 +5173,27 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           augment class B @99
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::B
             fields
               synthetic foo @-1
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@field::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 type: int
             accessors
               set foo= @124
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B::@setter::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
                 metadata
                   Annotation
@@ -5074,6 +5241,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -5081,6 +5249,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -5095,14 +5264,17 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         functions
           foo @103
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@function::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             metadata
               Annotation
@@ -5143,6 +5315,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -5150,6 +5323,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -5163,14 +5337,17 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         functions
           foo @90
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@function::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             parameters
               optionalPositional default x @95
@@ -5212,6 +5389,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -5219,6 +5397,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -5233,18 +5412,22 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         topLevelVariables
           synthetic static foo @-1
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@topLevelVariable::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             type: int
         accessors
           static get foo @106
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@accessor::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             metadata
               Annotation
@@ -5289,6 +5472,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -5296,6 +5480,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -5310,18 +5495,22 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         topLevelVariables
           synthetic static foo @-1
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@topLevelVariable::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             type: int
         accessors
           static set foo= @102
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@accessor::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             metadata
               Annotation
@@ -5365,6 +5554,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -5372,6 +5562,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -5385,18 +5576,22 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         topLevelVariables
           synthetic static foo @-1
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@topLevelVariable::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             type: dynamic
         accessors
           static set foo= @89
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@accessor::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             parameters
               requiredPositional x @104
@@ -5441,6 +5636,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -5448,6 +5644,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -5462,14 +5659,17 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         topLevelVariables
           static final foo @104
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@topLevelVariable::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             metadata
               Annotation
@@ -5494,6 +5694,7 @@
             shouldUseTypeForInitializerInference: false
         accessors
           synthetic static get foo @-1
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@accessor::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             returnType: int
 ''');
@@ -5519,6 +5720,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -5526,6 +5728,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -5540,14 +5743,17 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         topLevelVariables
           static final foo @104
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@topLevelVariable::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             metadata
               Annotation
@@ -5571,6 +5777,7 @@
             type: int
             shouldUseTypeForInitializerInference: false
           static final bar @113
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@topLevelVariable::bar
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             metadata
               Annotation
@@ -5595,9 +5802,11 @@
             shouldUseTypeForInitializerInference: false
         accessors
           synthetic static get foo @-1
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@accessor::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             returnType: int
           synthetic static get bar @-1
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@accessor::bar
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             returnType: int
 ''');
@@ -5625,6 +5834,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -5632,6 +5842,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -5646,14 +5857,17 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           class C @115
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@class::C
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             metadata
               Annotation
@@ -5712,6 +5926,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -5719,6 +5934,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -5733,14 +5949,17 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           class C @110
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@class::C
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             metadata
               Annotation
@@ -5791,6 +6010,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -5798,6 +6018,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -5812,14 +6033,17 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           class C @119
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@class::C
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             metadata
               Annotation
@@ -5883,6 +6107,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -5892,6 +6117,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -5908,10 +6134,13 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         prefix1 @116
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix1
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
@@ -5920,6 +6149,7 @@
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         functions
           foo @131
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@function::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             parameters
               requiredPositional x1 @145
@@ -5948,6 +6178,7 @@
     configuration.forCodeOptimizer();
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
@@ -5955,6 +6186,7 @@
       enclosingElement: <thisLibrary>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -5968,14 +6200,17 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         functions
           foo @90
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@function::foo
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             parameters
               requiredPositional x @104
@@ -6006,8 +6241,7 @@
 
     configuration
       ..withConstructors = false
-      ..withMetadata = false
-      ..withReferences = true;
+      ..withMetadata = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -6064,8 +6298,7 @@
       ..withConstructors = false
       ..withExportScope = true
       ..withMetadata = false
-      ..withPropertyLinking = true
-      ..withReferences = true;
+      ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -6120,8 +6353,7 @@
       ..withConstructors = false
       ..withExportScope = true
       ..withMetadata = false
-      ..withPropertyLinking = true
-      ..withReferences = true;
+      ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -6201,9 +6433,7 @@
 class A {}
 ''');
 
-    configuration
-      ..withMetadata = false
-      ..withReferences = true;
+    configuration.withMetadata = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -6289,8 +6519,7 @@
     configuration
       ..withConstructors = false
       ..withMetadata = false
-      ..withPropertyLinking = true
-      ..withReferences = true;
+      ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -6406,8 +6635,7 @@
     configuration
       ..withConstructors = false
       ..withMetadata = false
-      ..withPropertyLinking = true
-      ..withReferences = true;
+      ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -6511,8 +6739,7 @@
 
     configuration
       ..withConstructors = false
-      ..withMetadata = false
-      ..withReferences = true;
+      ..withMetadata = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -6604,8 +6831,7 @@
     configuration
       ..withConstructors = false
       ..withMetadata = false
-      ..withPropertyLinking = true
-      ..withReferences = true;
+      ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -6848,16 +7074,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @78
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
 ''');
   }
@@ -6878,19 +7107,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @44
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @93
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
 ''');
@@ -6910,16 +7143,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @76
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
 ''');
   }
@@ -6941,19 +7177,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @56
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -6961,9 +7201,11 @@
 class B {}
 ---
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           class B @49
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@class::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
 ''');
   }
@@ -6999,16 +7241,19 @@
       ];
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @35
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           MacroDiagnostic
@@ -7048,16 +7293,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     functions
       f @59
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: void
         macroDiagnostics
@@ -7087,10 +7335,12 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
@@ -7129,12 +7379,14 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
@@ -7143,6 +7395,7 @@
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class X @84
+        reference: <thisLibrary>::<definingUnit>::@class::X
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           MacroDiagnostic
@@ -7179,12 +7432,14 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
@@ -7193,6 +7448,7 @@
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class X @82
+        reference: <thisLibrary>::<definingUnit>::@class::X
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           MacroDiagnostic
@@ -7224,16 +7480,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @62
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           MacroDiagnostic
@@ -7268,19 +7527,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @33
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @97
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             typeParameters
               covariant T @101
@@ -7316,16 +7579,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @80
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @82
@@ -7362,19 +7628,23 @@
     configuration.withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @33
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @70
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             macroDiagnostics
               MacroDiagnostic
@@ -7407,19 +7677,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @33
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final foo @80
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -7433,6 +7707,7 @@
                 correctionMessage: Correction message
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
 ''');
@@ -7458,16 +7733,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     functions
       foo @79
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @83
@@ -7503,19 +7781,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @33
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @75
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             macroDiagnostics
@@ -7547,16 +7829,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     mixins
       mixin A @62
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           MacroDiagnostic
@@ -7591,16 +7876,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     mixins
       mixin A @80
+        reference: <thisLibrary>::<definingUnit>::@mixin::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @82
@@ -7637,16 +7925,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     typeAliases
       A @82
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         typeParameters
           covariant T @84
             defaultType: dynamic
@@ -7681,16 +7972,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @56
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           MacroDiagnostic
@@ -7701,6 +7995,7 @@
             severity: warning
         methods
           foo @67
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
 ''');
@@ -7726,16 +8021,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @78
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           MacroDiagnostic
@@ -7771,19 +8069,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @33
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final foo @102
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -7798,6 +8100,7 @@
                 severity: warning
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
 ''');
@@ -7823,23 +8126,28 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     functions
       foo @93
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @101
             type: int
           optionalNamed default b @113
+            reference: <thisLibrary>::<definingUnit>::@function::foo::@parameter::b
             type: String?
           optionalNamed default c @122
+            reference: <thisLibrary>::<definingUnit>::@function::foo::@parameter::c
             type: bool?
         returnType: void
         macroDiagnostics
@@ -7876,16 +8184,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     functions
       foo @98
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @106
@@ -7927,16 +8238,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     functions
       foo @76
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
         macroDiagnostics
@@ -7972,16 +8286,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     functions
       foo @144
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function(bool, {int b, String c})
         macroDiagnostics
@@ -8019,16 +8336,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     functions
       foo @139
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function(int, String)
         macroDiagnostics
@@ -8066,16 +8386,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     functions
       foo @103
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function()
         macroDiagnostics
@@ -8111,16 +8434,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     functions
       foo @88
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: void Function()
         macroDiagnostics
@@ -8157,19 +8483,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @33
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final foo @98
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: false
@@ -8184,6 +8514,7 @@
                 severity: warning
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
 ''');
@@ -8209,16 +8540,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     functions
       foo @98
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional a @102
@@ -8258,16 +8592,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     functions
       foo @72
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
         macroDiagnostics
@@ -8304,19 +8641,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @33
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @90
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: dynamic
             macroDiagnostics
@@ -8351,16 +8692,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static final foo @80
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
@@ -8370,11 +8714,12 @@
               message: Reported message
               target: TypeAnnotationMacroDiagnosticTarget
                 ElementTypeLocation
-                  element: <thisLibrary>::<definingUnit>::@variable::foo
+                  element: <thisLibrary>::<definingUnit>::@topLevelVariable::foo
                 VariableTypeLocation
             severity: warning
     accessors
       synthetic static get foo @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -8400,16 +8745,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     functions
       foo @86
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: (int, String)
         macroDiagnostics
@@ -8446,19 +8794,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     typeAliases
       A @35
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         aliasedType: List<int>
     functions
       foo @98
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<int>
           alias: <thisLibrary>::<definingUnit>::@typeAlias::A
@@ -8496,19 +8848,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @33
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @116
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @124
@@ -8552,19 +8908,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @33
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @94
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
             macroDiagnostics
@@ -8600,16 +8960,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     functions
       foo @114
+        reference: <thisLibrary>::<definingUnit>::@function::foo
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Map<int, String>
         macroDiagnostics
@@ -8649,19 +9012,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @33
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final foo @145
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: (bool, {int a, String b})?
             shouldUseTypeForInitializerInference: true
@@ -8678,6 +9045,7 @@
                 severity: warning
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: (bool, {int a, String b})?
 ''');
@@ -8706,19 +9074,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @33
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           final foo @138
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: (int, String)?
             shouldUseTypeForInitializerInference: true
@@ -8735,6 +9107,7 @@
                 severity: warning
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: (int, String)?
 ''');
@@ -8760,16 +9133,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     typeAliases
       A @81
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::A
         aliasedType: List<int>
         macroDiagnostics
           MacroDiagnostic
@@ -8804,16 +9180,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @62
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           MacroDiagnostic
@@ -8834,9 +9213,11 @@
             correctionMessage: Correction message
         methods
           foo @73
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
           bar @89
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::bar
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
 ''');
@@ -8860,16 +9241,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @61
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           MacroDiagnostic
@@ -8899,16 +9283,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @60
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           MacroDiagnostic
@@ -8938,16 +9325,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @63
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           MacroDiagnostic
@@ -8977,16 +9367,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @68
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           MacroDiagnostic
@@ -9024,19 +9417,23 @@
     configuration.withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @33
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           @76
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             macroDiagnostics
               MacroDiagnostic
@@ -9076,19 +9473,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @33
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           foo @80
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: true
@@ -9109,9 +9510,11 @@
                 correctionMessage: Try reporting the failure to the macro author.
         accessors
           synthetic get foo @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic set foo= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _foo @-1
@@ -9140,19 +9543,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @33
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @81
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             macroDiagnostics
@@ -9191,16 +9598,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @67
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           MacroDiagnostic
@@ -9243,16 +9653,19 @@
       ];
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @55
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           ExceptionMacroDiagnostic
@@ -9288,16 +9701,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @55
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           ExceptionMacroDiagnostic
@@ -9324,16 +9740,19 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/diagnostic.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/diagnostic.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @61
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         macroDiagnostics
           MacroDiagnostic
@@ -9359,13 +9778,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       macro class A @12
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
 ''');
   }
@@ -9377,16 +9800,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       macro class alias A @23
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Object
         mixins
           M
         constructors
           synthetic const @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             constantInitializers
               SuperConstructorInvocation
@@ -9397,6 +9824,7 @@
                 staticElement: dart:core::<definingUnit>::@class::Object::@constructor::new
     mixins
       mixin M @6
+        reference: <thisLibrary>::<definingUnit>::@mixin::M
         enclosingElement: <thisLibrary>::<definingUnit>
         superclassConstraints
           Object
@@ -9422,24 +9850,29 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @29
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
       class B @125
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
         supertype: A
         augmented
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -9455,16 +9888,20 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @78
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/test.dart as prefix0 @78
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           class C @94
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@class::C
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
           augment class B @113
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::B
 ''');
@@ -9490,19 +9927,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @29
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @74
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             macroDiagnostics
@@ -9582,19 +10023,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @29
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @74
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             macroDiagnostics
@@ -9625,23 +10070,28 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @29
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @85
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -9649,9 +10099,11 @@
 extension B on int {}
 ---
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         extensions
           B @53
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@extension::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             extendedType: int
 ''');
@@ -9672,19 +10124,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @29
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @91
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             macroDiagnostics
@@ -9715,19 +10171,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @29
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @74
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             macroDiagnostics
@@ -9758,19 +10218,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @29
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @80
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             macroDiagnostics
@@ -9801,19 +10265,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @29
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @78
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             macroDiagnostics
@@ -9846,19 +10314,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @29
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @77
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             macroDiagnostics
@@ -9891,19 +10363,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @29
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @79
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             macroDiagnostics
@@ -9936,19 +10412,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @29
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @80
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             macroDiagnostics
@@ -9981,19 +10461,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @29
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @78
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             macroDiagnostics
@@ -10029,19 +10513,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @29
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @87
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             macroDiagnostics
@@ -10058,21 +10546,26 @@
 ---
     enums
       enum B @104
+        reference: <thisLibrary>::<definingUnit>::@enum::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Enum
         fields
           static const enumConstant v @107
+            reference: <thisLibrary>::<definingUnit>::@enum::B::@field::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::B
             type: B
             shouldUseTypeForInitializerInference: false
           synthetic static const values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::B::@field::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::B
             type: List<B>
         accessors
           synthetic static get v @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::B::@getter::v
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::B
             returnType: B
           synthetic static get values @-1
+            reference: <thisLibrary>::<definingUnit>::@enum::B::@getter::values
             enclosingElement: <thisLibrary>::<definingUnit>::@enum::B
             returnType: List<B>
 ''');
@@ -10093,19 +10586,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @29
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @89
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             macroDiagnostics
@@ -10138,19 +10635,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @29
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @95
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             macroDiagnostics
@@ -10183,20 +10684,24 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @29
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::A
         methods
           foo @82
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             augmentation: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::A::@methodAugmentation::foo
@@ -10205,6 +10710,7 @@
             <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::A::@methodAugmentation::foo
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -10214,13 +10720,16 @@
 }
 ---
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           augment class A @57
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::A
             methods
               augment foo @76
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::A::@methodAugmentation::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::A
                 returnType: void
                 augmentationTarget: <thisLibrary>::<definingUnit>::@class::A::@method::foo
@@ -10242,19 +10751,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @29
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @81
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             macroDiagnostics
@@ -10287,19 +10800,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @29
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @78
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             macroDiagnostics
@@ -10332,19 +10849,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @29
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @80
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             macroDiagnostics
@@ -10377,19 +10898,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @29
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         methods
           foo @84
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
             macroDiagnostics
@@ -10441,7 +10966,6 @@
 
     configuration
       ..withConstructors = false
-      ..withReferences = true
       ..withMetadata = false;
     checkElementText(library, r'''
 library
@@ -10555,9 +11079,7 @@
 }
 ''');
 
-    configuration
-      ..withReferences = true
-      ..withMetadata = false;
+    configuration.withMetadata = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -10750,12 +11272,14 @@
 
     var expectedLibraryText = r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
@@ -10764,6 +11288,7 @@
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class X @80
+        reference: <thisLibrary>::<definingUnit>::@class::X
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::X
         augmented
@@ -10771,6 +11296,7 @@
             <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::X::@method::foo
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -10780,13 +11306,16 @@
 }
 ---
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           augment class X @57
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::X
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::X
             methods
               foo @68
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::X::@method::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::X
                 returnType: void
 ''';
@@ -10838,12 +11367,14 @@
 
     var expectedLibraryText = r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
@@ -10852,6 +11383,7 @@
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class X @101
+        reference: <thisLibrary>::<definingUnit>::@class::X
         enclosingElement: <thisLibrary>::<definingUnit>
         augmentation: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::X
         augmented
@@ -10859,6 +11391,7 @@
             <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::X::@method::foo
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -10874,18 +11407,22 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           augment class X @99
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::X
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             augmentationTarget: <thisLibrary>::<definingUnit>::@class::X
             methods
               foo @115
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::X::@method::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@classAugmentation::X
                 returnType: A
 ''';
@@ -15775,8 +16312,7 @@
 
     configuration
       ..withConstructors = false
-      ..withMetadata = false
-      ..withReferences = true;
+      ..withMetadata = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -15823,22 +16359,27 @@
     configuration.withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @73
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -15846,12 +16387,15 @@
 class MyClass {}
 ---
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           class MyClass @49
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@class::MyClass
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@class::MyClass::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@class::MyClass
 ''');
   }
@@ -15867,25 +16411,31 @@
     configuration.withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart as prefix @24
       enclosingElement: <thisLibrary>
   prefixes
     prefix @24
+      reference: <thisLibrary>::@prefix::prefix
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart as prefix @24
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @84
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -15893,12 +16443,15 @@
 class MyClass {}
 ---
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           class MyClass @49
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@class::MyClass
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@class::MyClass::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@class::MyClass
 ''');
   }
@@ -15914,25 +16467,31 @@
     configuration.withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart as prefix @24
       enclosingElement: <thisLibrary>
   prefixes
     prefix @24
+      reference: <thisLibrary>::@prefix::prefix
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart as prefix @24
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @90
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -15940,12 +16499,15 @@
 class MyClass {}
 ---
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           class MyClass @49
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@class::MyClass
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             constructors
               synthetic @-1
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@class::MyClass::@constructor::new
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@class::MyClass
 ''');
   }
@@ -15962,8 +16524,7 @@
       ..withConstructors = false
       ..withExportScope = true
       ..withMetadata = false
-      ..withPropertyLinking = true
-      ..withReferences = true;
+      ..withPropertyLinking = true;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -16162,8 +16723,7 @@
 ''');
       configuration
         ..withConstructors = false
-        ..withMetadata = false
-        ..withReferences = true;
+        ..withMetadata = false;
       checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -16244,19 +16804,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/b.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/b.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class X @35
+        reference: <thisLibrary>::<definingUnit>::@class::X
         enclosingElement: <thisLibrary>::<definingUnit>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -16272,17 +16836,21 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           class MyClass @91
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@class::MyClass
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
             methods
               foo @108
+                reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@class::MyClass::@method::foo
                 enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart::@class::MyClass
                 parameters
                   requiredPositional _ @122
@@ -16633,19 +17201,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class X @37
+        reference: <thisLibrary>::<definingUnit>::@class::X
         enclosingElement: <thisLibrary>::<definingUnit>
   augmentationImports
     package:test/test.macro.dart
+      reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:test/test.dart';
@@ -16663,16 +17235,20 @@
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       prefixes
         prefix0 @75
+          reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@prefix::prefix0
           enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:test/test.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         libraryImports
           package:test/a.dart as prefix0 @75
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
         classes
           class A @112
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@class::A
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
           class B @124
+            reference: <thisLibrary>::@augmentation::package:test/test.macro.dart::@class::B
             enclosingElement: <thisLibrary>::@augmentation::package:test/test.macro.dart
 ''');
 
@@ -16857,8 +17433,7 @@
 
     configuration
       ..withConstructors = false
-      ..withMetadata = false
-      ..withReferences = true;
+      ..withMetadata = false;
     checkElementText(library, r'''
 library
   reference: <thisLibrary>
@@ -17587,19 +18162,23 @@
       ..withMetadata = false;
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/append.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/append.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A @74
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
   augmentationImports
     package:other/other.macro.dart
+      reference: <thisLibrary>::@augmentation::package:other/other.macro.dart
       macroGeneratedCode
 ---
 augment library 'package:other/other.dart';
@@ -17607,9 +18186,11 @@
 class B {}
 ---
       definingUnit
+        reference: <thisLibrary>::@augmentation::package:other/other.macro.dart
         enclosingElement: <thisLibrary>::@augmentation::package:other/other.macro.dart
         classes
           class B @51
+            reference: <thisLibrary>::@augmentation::package:other/other.macro.dart::@class::B
             enclosingElement: <thisLibrary>::@augmentation::package:other/other.macro.dart
 ''');
   }
diff --git a/pkg/analyzer/test/src/summary/top_level_inference_test.dart b/pkg/analyzer/test/src/summary/top_level_inference_test.dart
index 476471f..05cd2b6 100644
--- a/pkg/analyzer/test/src/summary/top_level_inference_test.dart
+++ b/pkg/analyzer/test/src/summary/top_level_inference_test.dart
@@ -365,109 +365,135 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static vPlusIntInt @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vPlusIntInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static vPlusIntDouble @29
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vPlusIntDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
       static vPlusDoubleInt @59
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vPlusDoubleInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
       static vPlusDoubleDouble @89
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vPlusDoubleDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
       static vMinusIntInt @124
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vMinusIntInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static vMinusIntDouble @150
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vMinusIntDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
       static vMinusDoubleInt @181
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vMinusDoubleInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
       static vMinusDoubleDouble @212
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vMinusDoubleDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get vPlusIntInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vPlusIntInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vPlusIntInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vPlusIntInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vPlusIntInt @-1
             type: int
         returnType: void
       synthetic static get vPlusIntDouble @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vPlusIntDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vPlusIntDouble= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vPlusIntDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vPlusIntDouble @-1
             type: double
         returnType: void
       synthetic static get vPlusDoubleInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vPlusDoubleInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vPlusDoubleInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vPlusDoubleInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vPlusDoubleInt @-1
             type: double
         returnType: void
       synthetic static get vPlusDoubleDouble @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vPlusDoubleDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vPlusDoubleDouble= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vPlusDoubleDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vPlusDoubleDouble @-1
             type: double
         returnType: void
       synthetic static get vMinusIntInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vMinusIntInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vMinusIntInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vMinusIntInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vMinusIntInt @-1
             type: int
         returnType: void
       synthetic static get vMinusIntDouble @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vMinusIntDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vMinusIntDouble= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vMinusIntDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vMinusIntDouble @-1
             type: double
         returnType: void
       synthetic static get vMinusDoubleInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vMinusDoubleInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vMinusDoubleInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vMinusDoubleInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vMinusDoubleInt @-1
             type: double
         returnType: void
       synthetic static get vMinusDoubleDouble @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vMinusDoubleDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vMinusDoubleDouble= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vMinusDoubleDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vMinusDoubleDouble @-1
@@ -482,18 +508,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static V @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: num
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: num
       synthetic static set V= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _V @-1
@@ -510,44 +541,55 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static a @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static t1 @15
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::t1
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static t2 @33
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::t2
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set a= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _a @-1
             type: int
         returnType: void
       synthetic static get t1 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::t1
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set t1= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::t1
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _t1 @-1
             type: int
         returnType: void
       synthetic static get t2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::t2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set t2= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::t2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _t2 @-1
@@ -564,44 +606,55 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static a @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<int>
         shouldUseTypeForInitializerInference: false
       static t1 @17
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::t1
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static t2 @38
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::t2
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<int>
       synthetic static set a= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _a @-1
             type: List<int>
         returnType: void
       synthetic static get t1 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::t1
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set t1= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::t1
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _t1 @-1
             type: int
         returnType: void
       synthetic static get t2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::t2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set t2= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::t2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _t2 @-1
@@ -621,23 +674,30 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           f @16
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic set f= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _f @-1
@@ -645,40 +705,49 @@
             returnType: void
     topLevelVariables
       static a @25
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: A
         shouldUseTypeForInitializerInference: false
       static t1 @42
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::t1
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static t2 @62
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::t2
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A
       synthetic static set a= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _a @-1
             type: A
         returnType: void
       synthetic static get t1 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::t1
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set t1= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::t1
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _t1 @-1
             type: int
         returnType: void
       synthetic static get t2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::t2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set t2= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::t2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _t2 @-1
@@ -699,70 +768,88 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class I @6
+        reference: <thisLibrary>::<definingUnit>::@class::I
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           f @16
+            reference: <thisLibrary>::<definingUnit>::@class::I::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I
             returnType: int
           synthetic set f= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I::@setter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I
             parameters
               requiredPositional _f @-1
                 type: int
             returnType: void
       abstract class C @36
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           I
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     topLevelVariables
       static c @56
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
       static t1 @63
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::t1
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static t2 @83
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::t2
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
             type: C
         returnType: void
       synthetic static get t1 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::t1
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set t1= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::t1
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _t1 @-1
             type: int
         returnType: void
       synthetic static get t2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::t2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set t2= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::t2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _t2 @-1
@@ -783,58 +870,73 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class I @6
+        reference: <thisLibrary>::<definingUnit>::@class::I
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           f @16
+            reference: <thisLibrary>::<definingUnit>::@class::I::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I
             returnType: int
           synthetic set f= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I::@setter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I
             parameters
               requiredPositional _f @-1
                 type: int
             returnType: void
       abstract class C @36
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           I
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     topLevelVariables
       static t1 @76
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::t1
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static t2 @101
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::t2
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get t1 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::t1
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set t1= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::t1
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _t1 @-1
             type: int
         returnType: void
       synthetic static get t2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::t2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set t2= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::t2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _t2 @-1
@@ -842,6 +944,7 @@
         returnType: void
     functions
       getC @56
+        reference: <thisLibrary>::<definingUnit>::@function::getC
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
 ''');
@@ -857,37 +960,45 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static uValue @80
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::uValue
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Future<int> Function()
         shouldUseTypeForInitializerInference: false
       static uFuture @121
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::uFuture
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Future<int> Function()
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get uValue @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::uValue
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Future<int> Function()
       synthetic static set uValue= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::uValue
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _uValue @-1
             type: Future<int> Function()
         returnType: void
       synthetic static get uFuture @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::uFuture
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Future<int> Function()
       synthetic static set uFuture= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::uFuture
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _uFuture @-1
@@ -895,9 +1006,11 @@
         returnType: void
     functions
       fValue @25
+        reference: <thisLibrary>::<definingUnit>::@function::fValue
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       fFuture @53 async
+        reference: <thisLibrary>::<definingUnit>::@function::fFuture
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Future<int>
 ''');
@@ -913,70 +1026,87 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static vBitXor @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vBitXor
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static vBitAnd @25
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vBitAnd
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static vBitOr @46
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vBitOr
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static vBitShiftLeft @66
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vBitShiftLeft
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static vBitShiftRight @94
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vBitShiftRight
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get vBitXor @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vBitXor
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vBitXor= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vBitXor
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vBitXor @-1
             type: int
         returnType: void
       synthetic static get vBitAnd @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vBitAnd
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vBitAnd= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vBitAnd
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vBitAnd @-1
             type: int
         returnType: void
       synthetic static get vBitOr @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vBitOr
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vBitOr= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vBitOr
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vBitOr @-1
             type: int
         returnType: void
       synthetic static get vBitShiftLeft @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vBitShiftLeft
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vBitShiftLeft= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vBitShiftLeft
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vBitShiftLeft @-1
             type: int
         returnType: void
       synthetic static get vBitShiftRight @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vBitShiftRight
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vBitShiftRight= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vBitShiftRight
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vBitShiftRight @-1
@@ -997,23 +1127,30 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           a @16
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get a @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic set a= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _a @-1
@@ -1021,44 +1158,54 @@
             returnType: void
         methods
           m @26
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: void
     topLevelVariables
       static vSetField @39
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vSetField
         enclosingElement: <thisLibrary>::<definingUnit>
         type: A
         shouldUseTypeForInitializerInference: false
       static vInvokeMethod @71
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vInvokeMethod
         enclosingElement: <thisLibrary>::<definingUnit>
         type: A
         shouldUseTypeForInitializerInference: false
       static vBoth @105
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vBoth
         enclosingElement: <thisLibrary>::<definingUnit>
         type: A
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get vSetField @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vSetField
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A
       synthetic static set vSetField= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vSetField
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vSetField @-1
             type: A
         returnType: void
       synthetic static get vInvokeMethod @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vInvokeMethod
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A
       synthetic static set vInvokeMethod= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vInvokeMethod
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vInvokeMethod @-1
             type: A
         returnType: void
       synthetic static get vBoth @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vBoth
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A
       synthetic static set vBoth= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vBoth
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vBoth @-1
@@ -1102,225 +1249,280 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           f @16
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: true
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic set f= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _f @-1
                 type: int
             returnType: void
       class B @31
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           a @39
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           synthetic get a @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: A
           synthetic set a= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _a @-1
                 type: A
             returnType: void
       class C @50
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           b @58
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: B
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get b @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: B
           synthetic set b= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _b @-1
                 type: B
             returnType: void
       class X @69
+        reference: <thisLibrary>::<definingUnit>::@class::X
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           a @77
+            reference: <thisLibrary>::<definingUnit>::@class::X::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             type: A
             shouldUseTypeForInitializerInference: true
           b @94
+            reference: <thisLibrary>::<definingUnit>::@class::X::@field::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             type: B
             shouldUseTypeForInitializerInference: true
           c @111
+            reference: <thisLibrary>::<definingUnit>::@class::X::@field::c
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             type: C
             shouldUseTypeForInitializerInference: true
           t01 @130
+            reference: <thisLibrary>::<definingUnit>::@class::X::@field::t01
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             type: int
             shouldUseTypeForInitializerInference: false
           t02 @147
+            reference: <thisLibrary>::<definingUnit>::@class::X::@field::t02
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             type: int
             shouldUseTypeForInitializerInference: false
           t03 @166
+            reference: <thisLibrary>::<definingUnit>::@class::X::@field::t03
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             type: int
             shouldUseTypeForInitializerInference: false
           t11 @187
+            reference: <thisLibrary>::<definingUnit>::@class::X::@field::t11
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             type: int
             shouldUseTypeForInitializerInference: false
           t12 @210
+            reference: <thisLibrary>::<definingUnit>::@class::X::@field::t12
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             type: int
             shouldUseTypeForInitializerInference: false
           t13 @235
+            reference: <thisLibrary>::<definingUnit>::@class::X::@field::t13
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             type: int
             shouldUseTypeForInitializerInference: false
           t21 @262
+            reference: <thisLibrary>::<definingUnit>::@class::X::@field::t21
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             type: int
             shouldUseTypeForInitializerInference: false
           t22 @284
+            reference: <thisLibrary>::<definingUnit>::@class::X::@field::t22
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             type: int
             shouldUseTypeForInitializerInference: false
           t23 @308
+            reference: <thisLibrary>::<definingUnit>::@class::X::@field::t23
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             type: int
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
         accessors
           synthetic get a @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             returnType: A
           synthetic set a= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@setter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             parameters
               requiredPositional _a @-1
                 type: A
             returnType: void
           synthetic get b @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@getter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             returnType: B
           synthetic set b= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@setter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             parameters
               requiredPositional _b @-1
                 type: B
             returnType: void
           synthetic get c @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@getter::c
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             returnType: C
           synthetic set c= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@setter::c
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             parameters
               requiredPositional _c @-1
                 type: C
             returnType: void
           synthetic get t01 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@getter::t01
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             returnType: int
           synthetic set t01= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@setter::t01
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             parameters
               requiredPositional _t01 @-1
                 type: int
             returnType: void
           synthetic get t02 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@getter::t02
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             returnType: int
           synthetic set t02= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@setter::t02
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             parameters
               requiredPositional _t02 @-1
                 type: int
             returnType: void
           synthetic get t03 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@getter::t03
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             returnType: int
           synthetic set t03= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@setter::t03
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             parameters
               requiredPositional _t03 @-1
                 type: int
             returnType: void
           synthetic get t11 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@getter::t11
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             returnType: int
           synthetic set t11= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@setter::t11
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             parameters
               requiredPositional _t11 @-1
                 type: int
             returnType: void
           synthetic get t12 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@getter::t12
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             returnType: int
           synthetic set t12= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@setter::t12
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             parameters
               requiredPositional _t12 @-1
                 type: int
             returnType: void
           synthetic get t13 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@getter::t13
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             returnType: int
           synthetic set t13= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@setter::t13
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             parameters
               requiredPositional _t13 @-1
                 type: int
             returnType: void
           synthetic get t21 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@getter::t21
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             returnType: int
           synthetic set t21= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@setter::t21
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             parameters
               requiredPositional _t21 @-1
                 type: int
             returnType: void
           synthetic get t22 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@getter::t22
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             returnType: int
           synthetic set t22= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@setter::t22
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             parameters
               requiredPositional _t22 @-1
                 type: int
             returnType: void
           synthetic get t23 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@getter::t23
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             returnType: int
           synthetic set t23= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::X::@setter::t23
             enclosingElement: <thisLibrary>::<definingUnit>::@class::X
             parameters
               requiredPositional _t23 @-1
@@ -1328,12 +1530,15 @@
             returnType: void
     functions
       newA @332
+        reference: <thisLibrary>::<definingUnit>::@function::newA
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A
       newB @353
+        reference: <thisLibrary>::<definingUnit>::@function::newB
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: B
       newC @374
+        reference: <thisLibrary>::<definingUnit>::@function::newC
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
 ''');
@@ -1345,18 +1550,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static V @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: num
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: num
       synthetic static set V= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _V @-1
@@ -1372,31 +1582,39 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static vEq @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vEq
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
       static vNotEq @22
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vNotEq
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get vEq @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vEq
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static set vEq= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vEq
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vEq @-1
             type: bool
         returnType: void
       synthetic static get vNotEq @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vNotEq
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static set vNotEq= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vNotEq
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vNotEq @-1
@@ -1412,16 +1630,20 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static a @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [a, b]
         type: dynamic
         shouldUseTypeForInitializerInference: false
       static b @21
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [a, b]
@@ -1429,18 +1651,22 @@
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set a= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _a @-1
             type: dynamic
         returnType: void
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set b= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _b @-1
@@ -1455,10 +1681,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static a @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [a]
@@ -1466,9 +1695,11 @@
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set a= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _a @-1
@@ -1485,44 +1716,55 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static a @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<num>
         shouldUseTypeForInitializerInference: false
       static b0 @22
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b0
         enclosingElement: <thisLibrary>::<definingUnit>
         type: num
         shouldUseTypeForInitializerInference: false
       static b1 @37
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b1
         enclosingElement: <thisLibrary>::<definingUnit>
         type: num
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<num>
       synthetic static set a= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _a @-1
             type: List<num>
         returnType: void
       synthetic static get b0 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b0
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: num
       synthetic static set b0= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::b0
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _b0 @-1
             type: num
         returnType: void
       synthetic static get b1 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b1
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: num
       synthetic static set b1= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::b1
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _b1 @-1
@@ -1543,24 +1785,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static x @21
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -1578,24 +1825,31 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           f @16
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: true
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set f= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _f @-1
@@ -1603,14 +1857,17 @@
             returnType: void
     topLevelVariables
       static x @29
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -1632,24 +1889,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static x @21
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -1670,24 +1932,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static x @21
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -1705,24 +1972,31 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           f @16
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set f= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _f @-1
@@ -1730,14 +2004,17 @@
             returnType: void
     topLevelVariables
       static x @29
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -1759,24 +2036,29 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/a.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/a.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static x @21
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -1796,43 +2078,55 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           f @16
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic set f= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _f @-1
                 type: int
             returnType: void
       class B @27
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static t @44
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::t
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           synthetic static get t @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::t
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: int
           synthetic static set t= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::t
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _t @-1
@@ -1851,23 +2145,30 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           b @17
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: bool
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get b @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: bool
           synthetic set b= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _b @-1
@@ -1875,26 +2176,32 @@
             returnType: void
     topLevelVariables
       static c @24
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
       static x @31
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
             type: C
         returnType: void
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -1914,57 +2221,72 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class I @6
+        reference: <thisLibrary>::<definingUnit>::@class::I
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           b @17
+            reference: <thisLibrary>::<definingUnit>::@class::I::@field::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I
             type: bool
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I
         accessors
           synthetic get b @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I::@getter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I
             returnType: bool
           synthetic set b= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I::@setter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I
             parameters
               requiredPositional _b @-1
                 type: bool
             returnType: void
       abstract class C @37
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           I
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     topLevelVariables
       static c @57
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: C
       static x @64
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
             type: C
         returnType: void
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -1984,45 +2306,57 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class I @6
+        reference: <thisLibrary>::<definingUnit>::@class::I
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           b @17
+            reference: <thisLibrary>::<definingUnit>::@class::I::@field::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I
             type: bool
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I
         accessors
           synthetic get b @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I::@getter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I
             returnType: bool
           synthetic set b= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::I::@setter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::I
             parameters
               requiredPositional _b @-1
                 type: bool
             returnType: void
       abstract class C @37
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           I
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
     topLevelVariables
       static x @74
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -2030,6 +2364,7 @@
         returnType: void
     functions
       f @57
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: C
 ''');
@@ -2048,52 +2383,66 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           foo @16
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
       class B @36
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         methods
           foo @52
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: int
     topLevelVariables
       static x @70
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static y @89
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::y
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
             type: int
         returnType: void
       synthetic static get y @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::y
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set y= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::y
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _y @-1
@@ -2114,89 +2463,109 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     dart:async
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       dart:async
         enclosingElement: <thisLibrary>::<definingUnit>
     topLevelVariables
       static vFuture @25
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vFuture
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Future<int>
         shouldUseTypeForInitializerInference: false
       static v_noParameters_inferredReturnType @60
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v_noParameters_inferredReturnType
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int Function()
         shouldUseTypeForInitializerInference: false
       static v_hasParameter_withType_inferredReturnType @110
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v_hasParameter_withType_inferredReturnType
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int Function(String)
         shouldUseTypeForInitializerInference: false
       static v_hasParameter_withType_returnParameter @177
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v_hasParameter_withType_returnParameter
         enclosingElement: <thisLibrary>::<definingUnit>
         type: String Function(String)
         shouldUseTypeForInitializerInference: false
       static v_async_returnValue @240
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v_async_returnValue
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Future<int> Function()
         shouldUseTypeForInitializerInference: false
       static v_async_returnFuture @282
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v_async_returnFuture
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Future<int> Function()
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get vFuture @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vFuture
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Future<int>
       synthetic static set vFuture= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vFuture
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vFuture @-1
             type: Future<int>
         returnType: void
       synthetic static get v_noParameters_inferredReturnType @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v_noParameters_inferredReturnType
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function()
       synthetic static set v_noParameters_inferredReturnType= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v_noParameters_inferredReturnType
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v_noParameters_inferredReturnType @-1
             type: int Function()
         returnType: void
       synthetic static get v_hasParameter_withType_inferredReturnType @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v_hasParameter_withType_inferredReturnType
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int Function(String)
       synthetic static set v_hasParameter_withType_inferredReturnType= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v_hasParameter_withType_inferredReturnType
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v_hasParameter_withType_inferredReturnType @-1
             type: int Function(String)
         returnType: void
       synthetic static get v_hasParameter_withType_returnParameter @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v_hasParameter_withType_returnParameter
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: String Function(String)
       synthetic static set v_hasParameter_withType_returnParameter= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v_hasParameter_withType_returnParameter
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v_hasParameter_withType_returnParameter @-1
             type: String Function(String)
         returnType: void
       synthetic static get v_async_returnValue @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v_async_returnValue
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Future<int> Function()
       synthetic static set v_async_returnValue= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v_async_returnValue
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v_async_returnValue @-1
             type: Future<int> Function()
         returnType: void
       synthetic static get v_async_returnFuture @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v_async_returnFuture
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Future<int> Function()
       synthetic static set v_async_returnFuture= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v_async_returnFuture
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v_async_returnFuture @-1
@@ -2212,18 +2581,23 @@
     // TODO(scheglov): add more function expression tests
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static v @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get v @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set v= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v @-1
@@ -2240,31 +2614,39 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static vHasTypeArgument @22
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vHasTypeArgument
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static vNoTypeArgument @55
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vNoTypeArgument
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get vHasTypeArgument @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vHasTypeArgument
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vHasTypeArgument= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vHasTypeArgument
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vHasTypeArgument @-1
             type: int
         returnType: void
       synthetic static get vNoTypeArgument @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vNoTypeArgument
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set vNoTypeArgument= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vNoTypeArgument
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vNoTypeArgument @-1
@@ -2272,6 +2654,7 @@
         returnType: void
     functions
       f @2
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @4
@@ -2288,31 +2671,39 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static vOkArgumentType @29
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vOkArgumentType
         enclosingElement: <thisLibrary>::<definingUnit>
         type: String
         shouldUseTypeForInitializerInference: false
       static vWrongArgumentType @57
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vWrongArgumentType
         enclosingElement: <thisLibrary>::<definingUnit>
         type: String
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get vOkArgumentType @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vOkArgumentType
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: String
       synthetic static set vOkArgumentType= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vOkArgumentType
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vOkArgumentType @-1
             type: String
         returnType: void
       synthetic static get vWrongArgumentType @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vWrongArgumentType
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: String
       synthetic static set vWrongArgumentType= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vWrongArgumentType
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vWrongArgumentType @-1
@@ -2320,6 +2711,7 @@
         returnType: void
     functions
       f @7
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional p @13
@@ -2350,43 +2742,54 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @101
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static staticClassVariable @118
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::staticClassVariable
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: false
           synthetic static staticGetter @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::staticGetter
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic static get staticClassVariable @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::staticClassVariable
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic static set staticClassVariable= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::staticClassVariable
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _staticClassVariable @-1
                 type: int
             returnType: void
           static get staticGetter @160
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::staticGetter
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
         methods
           static staticClassMethod @195
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::staticClassMethod
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional p @217
                 type: int
             returnType: String
           instanceClassMethod @238
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::instanceClassMethod
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional p @262
@@ -2394,131 +2797,161 @@
             returnType: String
     topLevelVariables
       static topLevelVariable @44
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::topLevelVariable
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static r_topLevelFunction @280
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::r_topLevelFunction
         enclosingElement: <thisLibrary>::<definingUnit>
         type: String Function(int)
         shouldUseTypeForInitializerInference: false
       static r_topLevelVariable @323
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::r_topLevelVariable
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static r_topLevelGetter @366
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::r_topLevelGetter
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static r_staticClassVariable @405
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::r_staticClassVariable
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static r_staticGetter @456
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::r_staticGetter
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static r_staticClassMethod @493
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::r_staticClassMethod
         enclosingElement: <thisLibrary>::<definingUnit>
         type: String Function(int)
         shouldUseTypeForInitializerInference: false
       static instanceOfA @540
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::instanceOfA
         enclosingElement: <thisLibrary>::<definingUnit>
         type: A
         shouldUseTypeForInitializerInference: false
       static r_instanceClassMethod @567
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::r_instanceClassMethod
         enclosingElement: <thisLibrary>::<definingUnit>
         type: String Function(int)
         shouldUseTypeForInitializerInference: false
       synthetic static topLevelGetter @-1
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::topLevelGetter
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
     accessors
       synthetic static get topLevelVariable @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::topLevelVariable
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set topLevelVariable= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::topLevelVariable
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _topLevelVariable @-1
             type: int
         returnType: void
       synthetic static get r_topLevelFunction @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::r_topLevelFunction
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: String Function(int)
       synthetic static set r_topLevelFunction= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::r_topLevelFunction
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _r_topLevelFunction @-1
             type: String Function(int)
         returnType: void
       synthetic static get r_topLevelVariable @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::r_topLevelVariable
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set r_topLevelVariable= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::r_topLevelVariable
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _r_topLevelVariable @-1
             type: int
         returnType: void
       synthetic static get r_topLevelGetter @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::r_topLevelGetter
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set r_topLevelGetter= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::r_topLevelGetter
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _r_topLevelGetter @-1
             type: int
         returnType: void
       synthetic static get r_staticClassVariable @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::r_staticClassVariable
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set r_staticClassVariable= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::r_staticClassVariable
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _r_staticClassVariable @-1
             type: int
         returnType: void
       synthetic static get r_staticGetter @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::r_staticGetter
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set r_staticGetter= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::r_staticGetter
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _r_staticGetter @-1
             type: int
         returnType: void
       synthetic static get r_staticClassMethod @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::r_staticClassMethod
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: String Function(int)
       synthetic static set r_staticClassMethod= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::r_staticClassMethod
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _r_staticClassMethod @-1
             type: String Function(int)
         returnType: void
       synthetic static get instanceOfA @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::instanceOfA
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A
       synthetic static set instanceOfA= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::instanceOfA
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _instanceOfA @-1
             type: A
         returnType: void
       synthetic static get r_instanceClassMethod @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::r_instanceClassMethod
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: String Function(int)
       synthetic static set r_instanceClassMethod= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::r_instanceClassMethod
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _r_instanceClassMethod @-1
             type: String Function(int)
         returnType: void
       static get topLevelGetter @74
+        reference: <thisLibrary>::<definingUnit>::@getter::topLevelGetter
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
     functions
       topLevelFunction @7
+        reference: <thisLibrary>::<definingUnit>::@function::topLevelFunction
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional p @28
@@ -2539,13 +2972,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static a @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             typeInferenceError: dependencyCycle
               arguments: [a, b]
@@ -2553,21 +2990,26 @@
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic static get a @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: dynamic
           synthetic static set a= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _a @-1
                 type: dynamic
             returnType: void
       class B @40
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static b @57
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             typeInferenceError: dependencyCycle
               arguments: [a, b]
@@ -2575,12 +3017,15 @@
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           synthetic static get b @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: dynamic
           synthetic static set b= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::b
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _b @-1
@@ -2588,14 +3033,17 @@
             returnType: void
     topLevelVariables
       static c @72
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
@@ -2614,13 +3062,17 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static a @23
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             typeInferenceError: dependencyCycle
               arguments: [a, b]
@@ -2628,12 +3080,15 @@
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic static get a @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: dynamic
           synthetic static set a= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::a
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _a @-1
@@ -2641,29 +3096,35 @@
             returnType: void
     topLevelVariables
       static b @36
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [a, b]
         type: dynamic
         shouldUseTypeForInitializerInference: false
       static c @49
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set b= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _b @-1
             type: dynamic
         returnType: void
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set c= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _c @-1
@@ -2681,42 +3142,52 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static final a @6
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [a, b, c]
         type: dynamic
         shouldUseTypeForInitializerInference: false
       static final b @19
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [a, b, c]
         type: dynamic
         shouldUseTypeForInitializerInference: false
       static final c @32
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::c
         enclosingElement: <thisLibrary>::<definingUnit>
         typeInferenceError: dependencyCycle
           arguments: [a, b, c]
         type: dynamic
         shouldUseTypeForInitializerInference: false
       static final d @45
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::d
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static get c @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::c
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static get d @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::d
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -2749,24 +3220,31 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
     topLevelVariables
       static a @15
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: A
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A
       synthetic static set a= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _a @-1
@@ -2783,31 +3261,39 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static s @25
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::s
         enclosingElement: <thisLibrary>::<definingUnit>
         type: String
         shouldUseTypeForInitializerInference: false
       static h @49
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::h
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get s @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::s
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: String
       synthetic static set s= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::s
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _s @-1
             type: String
         returnType: void
       synthetic static get h @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::h
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set h= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::h
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _h @-1
@@ -2815,6 +3301,7 @@
         returnType: void
     functions
       f @8
+        reference: <thisLibrary>::<definingUnit>::@function::f
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
 ''');
@@ -2828,43 +3315,54 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static d @8
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::d
         enclosingElement: <thisLibrary>::<definingUnit>
         type: dynamic
       static s @15
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::s
         enclosingElement: <thisLibrary>::<definingUnit>
         type: String
         shouldUseTypeForInitializerInference: false
       static h @37
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::h
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get d @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::d
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: dynamic
       synthetic static set d= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::d
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _d @-1
             type: dynamic
         returnType: void
       synthetic static get s @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::s
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: String
       synthetic static set s= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::s
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _s @-1
             type: String
         returnType: void
       synthetic static get h @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::h
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set h= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::h
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _h @-1
@@ -2880,31 +3378,39 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static a @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
       static b @17
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set a= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _a @-1
             type: double
         returnType: void
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static set b= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _b @-1
@@ -2950,57 +3456,71 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static vObject @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vObject
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<Object>
         shouldUseTypeForInitializerInference: false
       static vNum @37
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vNum
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<num>
         shouldUseTypeForInitializerInference: false
       static vNumEmpty @64
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vNumEmpty
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<num>
         shouldUseTypeForInitializerInference: false
       static vInt @89
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<int>
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get vObject @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vObject
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<Object>
       synthetic static set vObject= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vObject
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vObject @-1
             type: List<Object>
         returnType: void
       synthetic static get vNum @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vNum
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<num>
       synthetic static set vNum= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vNum
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vNum @-1
             type: List<num>
         returnType: void
       synthetic static get vNumEmpty @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vNumEmpty
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<num>
       synthetic static set vNumEmpty= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vNumEmpty
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vNumEmpty @-1
             type: List<num>
         returnType: void
       synthetic static get vInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<int>
       synthetic static set vInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vInt @-1
@@ -3017,44 +3537,55 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static vInt @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<int>
         shouldUseTypeForInitializerInference: false
       static vNum @26
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vNum
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<num>
         shouldUseTypeForInitializerInference: false
       static vObject @47
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vObject
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<Object>
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get vInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<int>
       synthetic static set vInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vInt @-1
             type: List<int>
         returnType: void
       synthetic static get vNum @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vNum
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<num>
       synthetic static set vNum= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vNum
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vNum @-1
             type: List<num>
         returnType: void
       synthetic static get vObject @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vObject
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<Object>
       synthetic static set vObject= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vObject
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vObject @-1
@@ -3085,70 +3616,87 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static vObjectObject @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vObjectObject
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Map<Object, Object>
         shouldUseTypeForInitializerInference: false
       static vComparableObject @50
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vComparableObject
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Map<Comparable<int>, Object>
         shouldUseTypeForInitializerInference: false
       static vNumString @109
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vNumString
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Map<num, String>
         shouldUseTypeForInitializerInference: false
       static vNumStringEmpty @149
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vNumStringEmpty
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Map<num, String>
         shouldUseTypeForInitializerInference: false
       static vIntString @188
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vIntString
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Map<int, String>
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get vObjectObject @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vObjectObject
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Map<Object, Object>
       synthetic static set vObjectObject= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vObjectObject
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vObjectObject @-1
             type: Map<Object, Object>
         returnType: void
       synthetic static get vComparableObject @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vComparableObject
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Map<Comparable<int>, Object>
       synthetic static set vComparableObject= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vComparableObject
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vComparableObject @-1
             type: Map<Comparable<int>, Object>
         returnType: void
       synthetic static get vNumString @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vNumString
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Map<num, String>
       synthetic static set vNumString= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vNumString
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vNumString @-1
             type: Map<num, String>
         returnType: void
       synthetic static get vNumStringEmpty @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vNumStringEmpty
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Map<num, String>
       synthetic static set vNumStringEmpty= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vNumStringEmpty
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vNumStringEmpty @-1
             type: Map<num, String>
         returnType: void
       synthetic static get vIntString @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vIntString
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Map<int, String>
       synthetic static set vIntString= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vIntString
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vIntString @-1
@@ -3165,44 +3713,55 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static vIntString @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vIntString
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Map<int, String>
         shouldUseTypeForInitializerInference: false
       static vNumString @39
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vNumString
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Map<num, String>
         shouldUseTypeForInitializerInference: false
       static vIntObject @76
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vIntObject
         enclosingElement: <thisLibrary>::<definingUnit>
         type: Map<int, Object>
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get vIntString @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vIntString
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Map<int, String>
       synthetic static set vIntString= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vIntString
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vIntString @-1
             type: Map<int, String>
         returnType: void
       synthetic static get vNumString @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vNumString
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Map<num, String>
       synthetic static set vNumString= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vNumString
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vNumString @-1
             type: Map<num, String>
         returnType: void
       synthetic static get vIntObject @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vIntObject
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: Map<int, Object>
       synthetic static set vIntObject= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vIntObject
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vIntObject @-1
@@ -3233,70 +3792,87 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static a @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
       static b @18
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::b
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
       static vEq @32
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vEq
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
       static vAnd @50
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vAnd
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
       static vOr @69
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vOr
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static set a= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _a @-1
             type: bool
         returnType: void
       synthetic static get b @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static set b= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::b
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _b @-1
             type: bool
         returnType: void
       synthetic static get vEq @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vEq
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static set vEq= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vEq
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vEq @-1
             type: bool
         returnType: void
       synthetic static get vAnd @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vAnd
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static set vAnd= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vAnd
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vAnd @-1
             type: bool
         returnType: void
       synthetic static get vOr @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vOr
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static set vOr= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vOr
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vOr @-1
@@ -3335,16 +3911,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @19
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional p @25
@@ -3352,40 +3933,49 @@
             returnType: String
     topLevelVariables
       static instanceOfA @43
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::instanceOfA
         enclosingElement: <thisLibrary>::<definingUnit>
         type: A
         shouldUseTypeForInitializerInference: false
       static v1 @70
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v1
         enclosingElement: <thisLibrary>::<definingUnit>
         type: String
         shouldUseTypeForInitializerInference: false
       static v2 @96
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::v2
         enclosingElement: <thisLibrary>::<definingUnit>
         type: String
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get instanceOfA @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::instanceOfA
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: A
       synthetic static set instanceOfA= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::instanceOfA
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _instanceOfA @-1
             type: A
         returnType: void
       synthetic static get v1 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v1
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: String
       synthetic static set v1= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v1
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v1 @-1
             type: String
         returnType: void
       synthetic static get v2 @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::v2
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: String
       synthetic static set v2= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::v2
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _v2 @-1
@@ -3410,148 +4000,183 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static vModuloIntInt @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vModuloIntInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static vModuloIntDouble @31
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vModuloIntDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
       static vMultiplyIntInt @63
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vMultiplyIntInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static vMultiplyIntDouble @92
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vMultiplyIntDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
       static vMultiplyDoubleInt @126
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vMultiplyDoubleInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
       static vMultiplyDoubleDouble @160
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vMultiplyDoubleDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
       static vDivideIntInt @199
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDivideIntInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
       static vDivideIntDouble @226
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDivideIntDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
       static vDivideDoubleInt @258
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDivideDoubleInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
       static vDivideDoubleDouble @290
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDivideDoubleDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
       static vFloorDivide @327
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vFloorDivide
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get vModuloIntInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vModuloIntInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vModuloIntInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vModuloIntInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vModuloIntInt @-1
             type: int
         returnType: void
       synthetic static get vModuloIntDouble @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vModuloIntDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vModuloIntDouble= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vModuloIntDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vModuloIntDouble @-1
             type: double
         returnType: void
       synthetic static get vMultiplyIntInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vMultiplyIntInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vMultiplyIntInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vMultiplyIntInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vMultiplyIntInt @-1
             type: int
         returnType: void
       synthetic static get vMultiplyIntDouble @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vMultiplyIntDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vMultiplyIntDouble= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vMultiplyIntDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vMultiplyIntDouble @-1
             type: double
         returnType: void
       synthetic static get vMultiplyDoubleInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vMultiplyDoubleInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vMultiplyDoubleInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vMultiplyDoubleInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vMultiplyDoubleInt @-1
             type: double
         returnType: void
       synthetic static get vMultiplyDoubleDouble @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vMultiplyDoubleDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vMultiplyDoubleDouble= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vMultiplyDoubleDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vMultiplyDoubleDouble @-1
             type: double
         returnType: void
       synthetic static get vDivideIntInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDivideIntInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vDivideIntInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vDivideIntInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vDivideIntInt @-1
             type: double
         returnType: void
       synthetic static get vDivideIntDouble @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDivideIntDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vDivideIntDouble= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vDivideIntDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vDivideIntDouble @-1
             type: double
         returnType: void
       synthetic static get vDivideDoubleInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDivideDoubleInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vDivideDoubleInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vDivideDoubleInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vDivideDoubleInt @-1
             type: double
         returnType: void
       synthetic static get vDivideDoubleDouble @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDivideDoubleDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vDivideDoubleDouble= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vDivideDoubleDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vDivideDoubleDouble @-1
             type: double
         returnType: void
       synthetic static get vFloorDivide @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vFloorDivide
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vFloorDivide= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vFloorDivide
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vFloorDivide @-1
@@ -3568,44 +4193,55 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static a @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::a
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static vEq @15
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vEq
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
       static vNotEq @46
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vNotEq
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get a @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set a= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::a
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _a @-1
             type: int
         returnType: void
       synthetic static get vEq @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vEq
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static set vEq= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vEq
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vEq @-1
             type: bool
         returnType: void
       synthetic static get vNotEq @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vNotEq
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static set vNotEq= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vNotEq
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vNotEq @-1
@@ -3620,18 +4256,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static V @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::V
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get V @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set V= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::V
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _V @-1
@@ -3651,83 +4292,103 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static vInt @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static vDouble @18
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
       static vIncInt @37
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vIncInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static vDecInt @59
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDecInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static vIncDouble @81
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vIncDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
       static vDecDouble @109
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDecDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get vInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vInt @-1
             type: int
         returnType: void
       synthetic static get vDouble @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vDouble= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vDouble @-1
             type: double
         returnType: void
       synthetic static get vIncInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vIncInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vIncInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vIncInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vIncInt @-1
             type: int
         returnType: void
       synthetic static get vDecInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDecInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vDecInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vDecInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vDecInt @-1
             type: int
         returnType: void
       synthetic static get vIncDouble @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vIncDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vIncDouble= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vIncDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vIncDouble @-1
             type: double
         returnType: void
       synthetic static get vDecDouble @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDecDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vDecDouble= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vDecDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vDecDouble @-1
@@ -3747,83 +4408,103 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static vInt @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<int>
         shouldUseTypeForInitializerInference: false
       static vDouble @20
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<double>
         shouldUseTypeForInitializerInference: false
       static vIncInt @41
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vIncInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static vDecInt @66
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDecInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static vIncDouble @91
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vIncDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
       static vDecDouble @122
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDecDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get vInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<int>
       synthetic static set vInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vInt @-1
             type: List<int>
         returnType: void
       synthetic static get vDouble @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<double>
       synthetic static set vDouble= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vDouble @-1
             type: List<double>
         returnType: void
       synthetic static get vIncInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vIncInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vIncInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vIncInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vIncInt @-1
             type: int
         returnType: void
       synthetic static get vDecInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDecInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vDecInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vDecInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vDecInt @-1
             type: int
         returnType: void
       synthetic static get vIncDouble @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vIncDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vIncDouble= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vIncDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vIncDouble @-1
             type: double
         returnType: void
       synthetic static get vDecDouble @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDecDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vDecDouble= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vDecDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vDecDouble @-1
@@ -3843,83 +4524,103 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static vInt @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static vDouble @18
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
       static vIncInt @37
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vIncInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static vDecInt @59
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDecInt::@def::0
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static vIncDouble @81
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vIncDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
       static vDecInt @109
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDecInt::@def::1
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get vInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vInt @-1
             type: int
         returnType: void
       synthetic static get vDouble @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vDouble= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vDouble @-1
             type: double
         returnType: void
       synthetic static get vIncInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vIncInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vIncInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vIncInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vIncInt @-1
             type: int
         returnType: void
       synthetic static get vDecInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDecInt::@def::0
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vDecInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vDecInt::@def::0
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vDecInt @-1
             type: int
         returnType: void
       synthetic static get vIncDouble @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vIncDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vIncDouble= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vIncDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vIncDouble @-1
             type: double
         returnType: void
       synthetic static get vDecInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDecInt::@def::1
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vDecInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vDecInt::@def::1
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vDecInt @-1
@@ -3957,83 +4658,103 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static vInt @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<int>
         shouldUseTypeForInitializerInference: false
       static vDouble @20
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         type: List<double>
         shouldUseTypeForInitializerInference: false
       static vIncInt @41
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vIncInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static vDecInt @66
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDecInt::@def::0
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static vIncDouble @91
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vIncDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
       static vDecInt @122
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vDecInt::@def::1
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get vInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<int>
       synthetic static set vInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vInt @-1
             type: List<int>
         returnType: void
       synthetic static get vDouble @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: List<double>
       synthetic static set vDouble= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vDouble @-1
             type: List<double>
         returnType: void
       synthetic static get vIncInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vIncInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vIncInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vIncInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vIncInt @-1
             type: int
         returnType: void
       synthetic static get vDecInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDecInt::@def::0
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vDecInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vDecInt::@def::0
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vDecInt @-1
             type: int
         returnType: void
       synthetic static get vIncDouble @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vIncDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vIncDouble= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vIncDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vIncDouble @-1
             type: double
         returnType: void
       synthetic static get vDecInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vDecInt::@def::1
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vDecInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vDecInt::@def::1
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vDecInt @-1
@@ -4048,18 +4769,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static vNot @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vNot
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get vNot @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vNot
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static set vNot= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vNot
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vNot @-1
@@ -4076,44 +4802,55 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static vNegateInt @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vNegateInt
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
       static vNegateDouble @25
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vNegateDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         type: double
         shouldUseTypeForInitializerInference: false
       static vComplement @51
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vComplement
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get vNegateInt @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vNegateInt
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vNegateInt= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vNegateInt
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vNegateInt @-1
             type: int
         returnType: void
       synthetic static get vNegateDouble @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vNegateDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: double
       synthetic static set vNegateDouble= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vNegateDouble
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vNegateDouble @-1
             type: double
         returnType: void
       synthetic static get vComplement @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vComplement
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set vComplement= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vComplement
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vComplement @-1
@@ -4134,42 +4871,54 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           static d @21
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::d
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: D
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic static get d @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::d
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: D
           synthetic static set d= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::d
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _d @-1
                 type: D
             returnType: void
       class D @32
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           i @42
+            reference: <thisLibrary>::<definingUnit>::@class::D::@field::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
         accessors
           synthetic get i @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@getter::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             returnType: int
           synthetic set i= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@setter::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             parameters
               requiredPositional _i @-1
@@ -4177,11 +4926,13 @@
             returnType: void
     topLevelVariables
       static final x @53
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
 ''');
@@ -4199,36 +4950,47 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class C @6
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic static d @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::d
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: D
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           static get d @25
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::d
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: D
       class D @44
+        reference: <thisLibrary>::<definingUnit>::@class::D
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           i @54
+            reference: <thisLibrary>::<definingUnit>::@class::D::@field::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
         accessors
           synthetic get i @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@getter::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             returnType: int
           synthetic set i= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::D::@setter::i
             enclosingElement: <thisLibrary>::<definingUnit>::@class::D
             parameters
               requiredPositional _i @-1
@@ -4236,14 +4998,17 @@
             returnType: void
     topLevelVariables
       static x @63
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::x
         enclosingElement: <thisLibrary>::<definingUnit>
         type: int
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get x @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: int
       synthetic static set x= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::x
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _x @-1
@@ -4261,57 +5026,71 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     topLevelVariables
       static vLess @4
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vLess
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
       static vLessOrEqual @23
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vLessOrEqual
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
       static vGreater @50
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vGreater
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
       static vGreaterOrEqual @72
+        reference: <thisLibrary>::<definingUnit>::@topLevelVariable::vGreaterOrEqual
         enclosingElement: <thisLibrary>::<definingUnit>
         type: bool
         shouldUseTypeForInitializerInference: false
     accessors
       synthetic static get vLess @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vLess
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static set vLess= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vLess
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vLess @-1
             type: bool
         returnType: void
       synthetic static get vLessOrEqual @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vLessOrEqual
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static set vLessOrEqual= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vLessOrEqual
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vLessOrEqual @-1
             type: bool
         returnType: void
       synthetic static get vGreater @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vGreater
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static set vGreater= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vGreater
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vGreater @-1
             type: bool
         returnType: void
       synthetic static get vGreaterOrEqual @-1
+        reference: <thisLibrary>::<definingUnit>::@getter::vGreaterOrEqual
         enclosingElement: <thisLibrary>::<definingUnit>
         returnType: bool
       synthetic static set vGreaterOrEqual= @-1
+        reference: <thisLibrary>::<definingUnit>::@setter::vGreaterOrEqual
         enclosingElement: <thisLibrary>::<definingUnit>
         parameters
           requiredPositional _vGreaterOrEqual @-1
@@ -4341,41 +5120,52 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @25
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _x @-1
                 type: int
             returnType: void
       class B @36
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           set x= @59
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: void
 ''');
@@ -4390,18 +5180,23 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           f @16
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: false
         constructors
           @25
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               optionalPositional default final this.f @33
@@ -4412,9 +5207,11 @@
                 field: <thisLibrary>::<definingUnit>::@class::A::@field::f
         accessors
           synthetic get f @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic set f= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::f
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _f @-1
@@ -4438,83 +5235,105 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @25
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
           y @34
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
           z @43
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _x @-1
                 type: int
             returnType: void
           synthetic get y @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic set y= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _y @-1
                 type: int
             returnType: void
           synthetic get z @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic set z= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _z @-1
                 type: int
             returnType: void
       class B @54
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
         fields
           x @77
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int
           synthetic y @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int
           synthetic z @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: int
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _x @-1
                 type: int
             returnType: void
           get y @86
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: int
           set z= @103
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _ @105
@@ -4534,45 +5353,57 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @29
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: dynamic
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _x @-1
                 type: dynamic
             returnType: void
       class B @40
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
         fields
           x @63
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: dynamic
             shouldUseTypeForInitializerInference: true
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: dynamic
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _x @-1
@@ -4596,56 +5427,70 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant E @17
             defaultType: dynamic
         fields
           x @26
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: E
           y @33
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: E
           z @40
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: E
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: E
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _x @-1
                 type: E
             returnType: void
           synthetic get y @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: E
           synthetic set y= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _y @-1
                 type: E
             returnType: void
           synthetic get z @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: E
           synthetic set z= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _z @-1
                 type: E
             returnType: void
       class B @51
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @53
@@ -4654,31 +5499,39 @@
           A<T>
         fields
           x @80
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: T
           synthetic y @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: T
           synthetic z @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: T
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: T
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _x @-1
                 type: T
             returnType: void
           get y @89
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: T
           set z= @106
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _ @108
@@ -4698,45 +5551,57 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @25
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: dynamic
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _x @-1
                 type: dynamic
             returnType: void
       class B @36
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
         fields
           x @59
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: dynamic
             shouldUseTypeForInitializerInference: true
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: dynamic
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _x @-1
@@ -4756,45 +5621,57 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           x @25
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: num
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: num
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _x @-1
                 type: num
             returnType: void
       class B @36
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
         fields
           x @59
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: num
             shouldUseTypeForInitializerInference: true
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: num
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _x @-1
@@ -4818,65 +5695,84 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
           synthetic y @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
           synthetic z @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           abstract get x @29
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           abstract get y @42
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           abstract get z @55
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
       class B @66
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
         fields
           x @89
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int
           synthetic y @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int
           synthetic z @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: int
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _x @-1
                 type: int
             returnType: void
           get y @98
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: int
           set z= @115
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _ @117
@@ -4900,38 +5796,49 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant E @17
             defaultType: dynamic
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: E
           synthetic y @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: E
           synthetic z @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: E
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           abstract get x @30
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: E
           abstract get y @41
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: E
           abstract get z @52
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: E
       class B @63
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @65
@@ -4940,31 +5847,39 @@
           A<T>
         fields
           x @92
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: T
           synthetic y @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: T
           synthetic z @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: T
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: T
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _x @-1
                 type: T
             returnType: void
           get y @101
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: T
           set z= @118
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _ @120
@@ -4988,49 +5903,63 @@
     // TODO(scheglov): test for inference failure error
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           abstract get x @29
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
       abstract class B @49
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: String
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           abstract get x @66
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: String
       class C @77
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
           B
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           get x @103
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
 ''');
@@ -5051,49 +5980,63 @@
     // TODO(scheglov): test for inference failure error
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           abstract get x @29
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
       abstract class B @49
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           abstract get x @67
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: dynamic
       class C @78
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
           B
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           get x @104
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -5114,55 +6057,69 @@
     // TODO(scheglov): test for inference failure error
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @17
             defaultType: dynamic
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: T
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           abstract get x @30
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: T
       abstract class B @50
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @52
             defaultType: dynamic
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: T
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           abstract get x @65
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: T
       class C @76
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A<int>
           B<String>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           get x @115
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
 ''');
@@ -5182,49 +6139,63 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           abstract get x @29
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
       abstract class B @49
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           abstract get x @63
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: int
       class C @74
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
           B
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           get x @100
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -5247,79 +6218,100 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
           synthetic y @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           abstract get x @29
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           abstract get y @42
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
       abstract class B @62
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: String
           synthetic y @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: String
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           abstract set x= @77
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _ @86
                 type: String
             returnType: void
           abstract set y= @101
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _ @110
                 type: String
             returnType: void
       class C @122
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
           B
         fields
           x @148
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
           final y @159
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
                 type: dynamic
             returnType: void
           synthetic get y @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -5339,52 +6331,66 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           abstract get x @29
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
       abstract class B @49
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: String
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           abstract set x= @64
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _ @73
                 type: String
             returnType: void
       class C @85
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
           B
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           get x @111
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -5405,52 +6411,66 @@
     // TODO(scheglov): test for inference failure error
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           abstract get x @29
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
       abstract class B @49
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: String
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           abstract set x= @64
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _ @73
                 type: String
             returnType: void
       class C @85
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
           B
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: String
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           abstract set x= @111
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _ @113
@@ -5473,55 +6493,70 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           abstract get x @29
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
       abstract class B @49
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           abstract set x= @64
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _ @70
                 type: int
             returnType: void
       class C @82
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
           B
         fields
           x @108
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _x @-1
@@ -5544,52 +6579,66 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           abstract get x @29
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
       abstract class B @49
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           abstract set x= @64
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _ @70
                 type: int
             returnType: void
       class C @82
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
           B
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           get x @108
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -5609,52 +6658,66 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           abstract get x @29
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
       abstract class B @49
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           abstract set x= @64
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _ @70
                 type: int
             returnType: void
       class C @82
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
           B
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           abstract set x= @108
+            reference: <thisLibrary>::<definingUnit>::@class::C::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional _ @110
@@ -5678,74 +6741,93 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
           synthetic y @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
           synthetic z @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           abstract set x= @30
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _ @36
                 type: int
             returnType: void
           abstract set y= @51
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _ @57
                 type: int
             returnType: void
           abstract set z= @72
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _ @78
                 type: int
             returnType: void
       class B @90
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
         fields
           x @113
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int
           synthetic y @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int
           synthetic z @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: int
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _x @-1
                 type: int
             returnType: void
           get y @122
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: int
           set z= @139
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::z
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _ @141
@@ -5768,55 +6850,69 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           abstract set x= @30
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _ @36
                 type: int
             returnType: void
       abstract class B @57
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: String
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           abstract set x= @72
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _ @81
                 type: String
             returnType: void
       class C @93
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
           B
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           get x @119
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: dynamic
 ''');
@@ -5836,55 +6932,69 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           abstract set x= @30
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _ @36
                 type: int
             returnType: void
       abstract class B @57
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           abstract set x= @72
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional _ @78
                 type: int
             returnType: void
       class C @90
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
           B
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         accessors
           get x @116
+            reference: <thisLibrary>::<definingUnit>::@class::C::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             returnType: int
 ''');
@@ -5906,68 +7016,83 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @23
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @25
             defaultType: dynamic
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: dynamic Function()
               alias: <thisLibrary>::<definingUnit>::@typeAlias::F
                 typeArguments
                   T
           synthetic y @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: List<dynamic Function()>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           get x @41
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: dynamic Function()
               alias: <thisLibrary>::<definingUnit>::@typeAlias::F
                 typeArguments
                   T
           get y @69
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: List<dynamic Function()>
       class B @89
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A<int>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: dynamic Function()
               alias: <thisLibrary>::<definingUnit>::@typeAlias::F
                 typeArguments
                   int
           synthetic y @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: List<dynamic Function()>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
               substitution: {T: int}
         accessors
           get x @114
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: dynamic Function()
               alias: <thisLibrary>::<definingUnit>::@typeAlias::F
                 typeArguments
                   int
           get y @131
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::y
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: List<dynamic Function()>
     typeAliases
       functionTypeAliasBased F @8
+        reference: <thisLibrary>::<definingUnit>::@typeAlias::F
         typeParameters
           unrelated T @10
             defaultType: dynamic
@@ -5989,44 +7114,56 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: num
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           abstract get x @29
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: num
           abstract set x= @43
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional covariant _ @59
                 type: num
             returnType: void
       class B @71
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
         fields
           x @94
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           synthetic get x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: int
           synthetic set x= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional covariant _x @-1
@@ -6047,41 +7184,52 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: num
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           abstract get x @29
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: num
           abstract set x= @43
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional covariant _ @59
                 type: num
             returnType: void
       class B @71
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
         fields
           synthetic x @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@field::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             type: int
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         accessors
           set x= @94
+            reference: <thisLibrary>::<definingUnit>::@class::B::@setter::x
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional covariant _ @100
@@ -6100,50 +7248,63 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           t1 @16
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::t1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: false
           t2 @30
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::t2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: double
             shouldUseTypeForInitializerInference: false
           t3 @46
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::t3
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: dynamic
             shouldUseTypeForInitializerInference: false
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get t1 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::t1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic set t1= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::t1
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _t1 @-1
                 type: int
             returnType: void
           synthetic get t2 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::t2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: double
           synthetic set t2= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::t2
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _t2 @-1
                 type: double
             returnType: void
           synthetic get t3 @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::t3
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: dynamic
           synthetic set t3= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::t3
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _t3 @-1
@@ -6165,30 +7326,38 @@
     // top-level type inference error.
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @17
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @23
                 type: int
             returnType: void
       class B @37
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         methods
           m @58
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @60
@@ -6213,44 +7382,55 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @17
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @23
                 type: int
             returnType: void
       class B @37
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         methods
           m @48
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @57
                 type: String
             returnType: void
       class C @71
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         interfaces
           B
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         methods
           m @100
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             typeInferenceError: overrideNoCombinedSuperSignature
             parameters
@@ -6276,43 +7456,54 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           abstract foo @25
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional x @33
                 type: int
             returnType: int
       abstract class B @55
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         methods
           abstract foo @68
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional x @76
                 type: int
             returnType: double
       abstract class C @98
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
           B
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           abstract foo @126
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             typeInferenceError: overrideNoCombinedSuperSignature
             parameters
@@ -6337,38 +7528,49 @@
     // TODO(scheglov): test for inference failure error
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @16
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
       class B @31
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         methods
           m @44
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             returnType: String
       class C @59
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         interfaces
           B
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         methods
           m @88
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             typeInferenceError: overrideNoCombinedSuperSignature
             returnType: dynamic
@@ -6389,52 +7591,63 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @8
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @20
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @24
                 type: T
             returnType: void
       class B @38
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant E @40
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         methods
           m @52
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @56
                 type: E
             returnType: void
       class C @70
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A<int>
         interfaces
           B<double>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
               substitution: {T: int}
         methods
           m @112
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             typeInferenceError: overrideNoCombinedSuperSignature
             parameters
@@ -6458,10 +7671,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant K @8
@@ -6470,42 +7686,50 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @20
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @24
                 type: K
             returnType: V
       class B @38
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @40
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         methods
           m @49
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @55
                 type: int
             returnType: T
       class C @69
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A<int, String>
         interfaces
           B<double>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
               substitution: {K: int, V: String}
         methods
           m @119
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             typeInferenceError: overrideNoCombinedSuperSignature
             parameters
@@ -6526,35 +7750,44 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @17
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @23
                 type: int
             returnType: void
       class B @37
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         methods
           m @53
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @55
                 type: int
               optionalNamed default b @59
+                reference: <thisLibrary>::<definingUnit>::@class::B::@method::m::@parameter::b
                 type: dynamic
             returnType: void
 ''');
@@ -6571,30 +7804,38 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @17
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @23
                 type: int
             returnType: void
       class B @37
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         methods
           m @53
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @55
@@ -6616,30 +7857,38 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @12
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @14
                 type: dynamic
             returnType: dynamic
       class B @28
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         methods
           m @44
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @46
@@ -6659,30 +7908,38 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           foo @16
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @27
                 type: String
             returnType: int
       class B @47
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         methods
           m @63
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @65
@@ -6702,38 +7959,48 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         fields
           m @16
+            reference: <thisLibrary>::<definingUnit>::@class::A::@field::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             type: int
             shouldUseTypeForInitializerInference: true
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         accessors
           synthetic get m @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@getter::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             returnType: int
           synthetic set m= @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@setter::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional _m @-1
                 type: int
             returnType: void
       class B @32
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         methods
           m @48
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @50
@@ -6754,10 +8021,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant K @8
@@ -6766,15 +8036,18 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @20
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @24
                 type: K
             returnType: V
       class B @38
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @40
@@ -6782,21 +8055,25 @@
         supertype: A<int, T>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
               substitution: {K: int, V: T}
       class C @70
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: B<String>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
               substitution: {T: String}
         methods
           m @94
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional a @96
@@ -6819,44 +8096,55 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @19
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @25
                 type: int
             returnType: String
       class B @39
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         methods
           m @55
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @57
                 type: int
             returnType: String
       class C @71
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: B
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
         methods
           m @87
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional a @89
@@ -6879,44 +8167,55 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @19
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @25
                 type: int
             returnType: String
       class B @39
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         methods
           m @58
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @60
                 type: int
             returnType: String
       class C @74
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: B
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
         methods
           m @90
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional a @92
@@ -6939,45 +8238,56 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @19
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @25
                 type: int
             returnType: String
       class B @39
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Object
         mixins
           A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         methods
           m @67
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @69
                 type: int
             returnType: String
       class C @83
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: B
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
         methods
           m @99
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional a @101
@@ -6997,10 +8307,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant K @8
@@ -7009,9 +8322,11 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @20
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @24
@@ -7020,16 +8335,19 @@
                 type: double
             returnType: V
       class B @48
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A<int, String>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
               substitution: {K: int, V: String}
         methods
           m @77
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @79
@@ -7051,30 +8369,38 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @19
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @25
                 type: int
             returnType: String
       class B @39
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         methods
           m @55
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @57
@@ -7094,37 +8420,47 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @19
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @25
                 type: int
               optionalNamed default b @36
+                reference: <thisLibrary>::<definingUnit>::@class::A::@method::m::@parameter::b
                 type: double
             returnType: String
       class B @51
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         methods
           m @67
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @69
                 type: int
               optionalNamed default b @73
+                reference: <thisLibrary>::<definingUnit>::@class::B::@method::m::@parameter::b
                 type: double
             returnType: String
 ''');
@@ -7141,16 +8477,21 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @19
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @25
@@ -7159,14 +8500,17 @@
                 type: double
             returnType: String
       class B @51
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         methods
           m @67
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @69
@@ -7189,10 +8533,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant K @8
@@ -7201,15 +8548,18 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @20
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @24
                 type: K
             returnType: V
       class B @38
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @40
@@ -7217,21 +8567,25 @@
         supertype: A<int, T>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
               substitution: {K: int, V: T}
       class C @70
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: B<String>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
               substitution: {T: String}
         methods
           m @94
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional a @96
@@ -7251,10 +8605,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant K @17
@@ -7263,23 +8620,28 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           abstract m @29
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @33
                 type: K
             returnType: V
       class B @45
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A<int, String>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         methods
           m @77
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @79
@@ -7299,30 +8661,38 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           abstract m @28
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @34
                 type: int
             returnType: String
       class B @46
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         methods
           m @65
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @67
@@ -7343,10 +8713,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       abstract class A @15
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant K @17
@@ -7355,15 +8728,18 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           abstract m @29
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @33
                 type: K
             returnType: V
       abstract class B @54
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T1 @56
@@ -7373,19 +8749,23 @@
         supertype: A<T2, T1>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
               substitution: {K: T2, V: T1}
       class C @91
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         interfaces
           B<int, String>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
         methods
           m @123
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional a @125
@@ -7410,33 +8790,41 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   imports
     package:test/other.dart
       enclosingElement: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     libraryImports
       package:test/other.dart
         enclosingElement: <thisLibrary>::<definingUnit>
     classes
       class A1 @27
+        reference: <thisLibrary>::<definingUnit>::@class::A1
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A1::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A1
         methods
           _foo @38
+            reference: <thisLibrary>::<definingUnit>::@class::A1::@method::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A1
             returnType: int
       class A2 @59
+        reference: <thisLibrary>::<definingUnit>::@class::A2
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A1
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A2::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A2
             superConstructor: <thisLibrary>::<definingUnit>::@class::A1::@constructor::new
         methods
           _foo @77
+            reference: <thisLibrary>::<definingUnit>::@class::A2::@method::_foo
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A2
             returnType: int
 ''');
@@ -7453,31 +8841,39 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @19
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @25
                 type: int
             returnType: String
       class B @39
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: Object
         mixins
           A
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         methods
           m @67
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @69
@@ -7500,10 +8896,13 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant K @8
@@ -7512,42 +8911,50 @@
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @20
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @24
                 type: K
             returnType: V
       class B @38
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         typeParameters
           covariant T @40
             defaultType: dynamic
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         methods
           m @49
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @55
                 type: int
             returnType: T
       class C @69
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A<int, String>
         interfaces
           B<String>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: ConstructorMember
               base: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
               substitution: {K: int, V: String}
         methods
           m @119
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional a @121
@@ -7570,44 +8977,55 @@
 ''');
     checkElementText(library, r'''
 library
+  reference: <thisLibrary>
   definingUnit
+    reference: <thisLibrary>::<definingUnit>
     enclosingElement: <thisLibrary>
     classes
       class A @6
+        reference: <thisLibrary>::<definingUnit>::@class::A
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
         methods
           m @19
+            reference: <thisLibrary>::<definingUnit>::@class::A::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::A
             parameters
               requiredPositional a @25
                 type: int
             returnType: String
       class B @39
+        reference: <thisLibrary>::<definingUnit>::@class::B
         enclosingElement: <thisLibrary>::<definingUnit>
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::B::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
         methods
           m @52
+            reference: <thisLibrary>::<definingUnit>::@class::B::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::B
             parameters
               requiredPositional a @58
                 type: int
             returnType: String
       class C @72
+        reference: <thisLibrary>::<definingUnit>::@class::C
         enclosingElement: <thisLibrary>::<definingUnit>
         supertype: A
         interfaces
           B
         constructors
           synthetic @-1
+            reference: <thisLibrary>::<definingUnit>::@class::C::@constructor::new
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             superConstructor: <thisLibrary>::<definingUnit>::@class::A::@constructor::new
         methods
           m @101
+            reference: <thisLibrary>::<definingUnit>::@class::C::@method::m
             enclosingElement: <thisLibrary>::<definingUnit>::@class::C
             parameters
               requiredPositional a @103