Chromium Code Reviews| Index: pkg/analyzer/lib/src/dart/element/builder.dart |
| diff --git a/pkg/analyzer/lib/src/dart/element/builder.dart b/pkg/analyzer/lib/src/dart/element/builder.dart |
| index 39311d18b5e289c2d9b1724e44cb292965feb92c..48a732f47f28750b162918c7ed26b80c17cff89c 100644 |
| --- a/pkg/analyzer/lib/src/dart/element/builder.dart |
| +++ b/pkg/analyzer/lib/src/dart/element/builder.dart |
| @@ -160,6 +160,8 @@ class DirectiveElementBuilder extends SimpleAstVisitor<Object> { |
| @override |
| Object visitExportDirective(ExportDirective node) { |
| + // Remove previous element. (It will remain null if the target is missing.) |
| + node.element = null; |
|
Brian Wilkerson
2016/02/27 18:05:21
I don't understand why this would be necessary. Di
|
| Source exportedSource = node.source; |
| if (exportedSource != null && context.exists(exportedSource)) { |
| // The exported source will be null if the URI in the export |
| @@ -200,6 +202,9 @@ class DirectiveElementBuilder extends SimpleAstVisitor<Object> { |
| @override |
| Object visitImportDirective(ImportDirective node) { |
| + // Remove previous element. (It will remain null if the target is missing.) |
| + node.element = null; |
| + |
| String uriContent = node.uriContent; |
| if (DartUriResolver.isDartExtUri(uriContent)) { |
| libraryElement.hasExtUri = true; |