| Index: pkg/analyzer/lib/src/summary/resynthesize.dart
|
| diff --git a/pkg/analyzer/lib/src/summary/resynthesize.dart b/pkg/analyzer/lib/src/summary/resynthesize.dart
|
| index d60d4dce1b08e3e82c4aa971e37780ee6258d59c..daf1d1532e45e2880676246a5f5f587f7d3d4981 100644
|
| --- a/pkg/analyzer/lib/src/summary/resynthesize.dart
|
| +++ b/pkg/analyzer/lib/src/summary/resynthesize.dart
|
| @@ -414,10 +414,8 @@ class _ConstExprBuilder {
|
| EntityRef ref = uc.references[refPtr++];
|
| _ReferenceInfo info = resynthesizer.referenceInfos[ref.reference];
|
| if (info.element != null) {
|
| - Identifier node = _buildElementAst(info.name, info.element);
|
| - _push(node);
|
| - } else if (info.type != null) {
|
| - Identifier node = _buildElementAst(info.name, info.type.element);
|
| + SimpleIdentifier node = AstFactory.identifier3(info.name);
|
| + node.staticElement = info.element;
|
| _push(node);
|
| } else {
|
| throw new StateError('Unsupported reference ${ref.toMap()}');
|
| @@ -432,12 +430,6 @@ class _ConstExprBuilder {
|
| return stack.single;
|
| }
|
|
|
| - Identifier _buildElementAst(String name, Element element) {
|
| - SimpleIdentifier node = AstFactory.identifier3(name);
|
| - node.staticElement = element;
|
| - return node;
|
| - }
|
| -
|
| TypeName _buildTypeAst(DartType type) {
|
| if (type is DynamicTypeImpl) {
|
| TypeName node = AstFactory.typeName4('dynamic');
|
| @@ -1468,14 +1460,17 @@ class _LibraryResynthesizer {
|
| name = linkedUnit.references[i].name;
|
| containingReference = linkedUnit.references[i].containingReference;
|
| }
|
| - ElementHandle element;
|
| + Element element;
|
| DartType type;
|
| if (linkedReference.kind == ReferenceKind.unresolved) {
|
| type = summaryResynthesizer.typeProvider.undefinedType;
|
| + element = type.element;
|
| } else if (name == 'dynamic') {
|
| type = summaryResynthesizer.typeProvider.dynamicType;
|
| + element = type.element;
|
| } else if (name == 'void') {
|
| type = VoidTypeImpl.instance;
|
| + element = type.element;
|
| } else {
|
| List<String> locationComponents;
|
| if (containingReference != 0 &&
|
|
|