| Index: pkg/analyzer/lib/src/summary/index_unit.dart
|
| diff --git a/pkg/analyzer/lib/src/summary/index_unit.dart b/pkg/analyzer/lib/src/summary/index_unit.dart
|
| index c2c298e513ce0a40ce20dca4b8a390eb420ef460..ed3097dcdac801bf0b0f997e3cc0f8bfa958c33b 100644
|
| --- a/pkg/analyzer/lib/src/summary/index_unit.dart
|
| +++ b/pkg/analyzer/lib/src/summary/index_unit.dart
|
| @@ -102,7 +102,7 @@ class PackageIndexAssembler {
|
| offset = 0;
|
| }
|
| IndexSyntheticElementKind kind = getIndexElementKind(element);
|
| - return new _ElementInfo(unitId, offset, kind);
|
| + return new _ElementInfo(element, unitId, offset, kind);
|
| });
|
| }
|
|
|
| @@ -193,6 +193,11 @@ class _DefinedNameInfo {
|
| */
|
| class _ElementInfo {
|
| /**
|
| + * TODO(scheglov) remove after fixing build flakiness on bots
|
| + */
|
| + final Element element;
|
| +
|
| + /**
|
| * The identifier of the [CompilationUnitElement] containing this element.
|
| */
|
| final int unitId;
|
| @@ -213,7 +218,7 @@ class _ElementInfo {
|
| */
|
| int id;
|
|
|
| - _ElementInfo(this.unitId, this.offset, this.kind);
|
| + _ElementInfo(this.element, this.unitId, this.offset, this.kind);
|
| }
|
|
|
| /**
|
| @@ -587,6 +592,10 @@ class _UnitIndexAssembler {
|
| */
|
| UnitIndexBuilder assemble() {
|
| relations.sort((a, b) {
|
| + if (a.elementInfo.id == null) {
|
| + throw new StateError('No id for ${a.elementInfo.element}, '
|
| + 'location= ${a.elementInfo.element?.location}');
|
| + }
|
| return a.elementInfo.id - b.elementInfo.id;
|
| });
|
| definedNames.sort((a, b) {
|
|
|