Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Unified Diff: pkg/analyzer/lib/src/dart/analysis/index.dart

Issue 2809523002: Issue 29288. Resynthesize Import/Export/PartElement for every directive. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/src/dart/analysis/index.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/index.dart b/pkg/analyzer/lib/src/dart/analysis/index.dart
index 04d33590e43284d4e810c0c09baf8162e1326e61..f4b2139f6a8d0343fa4392bed4360de5b0f9a2ae 100644
--- a/pkg/analyzer/lib/src/dart/analysis/index.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/index.dart
@@ -610,8 +610,10 @@ class _IndexContributor extends GeneralizingAstVisitor {
@override
visitPartDirective(PartDirective node) {
- Element element = node.element;
- recordUriReference(element, node);
+ CompilationUnitElement element = node.element;
+ if (element?.source != null) {
+ recordUriReference(element, node);
+ }
super.visitPartDirective(node);
}

Powered by Google App Engine
This is Rietveld 408576698