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

Unified Diff: pkg/analyzer/lib/src/generated/declaration_resolver.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/generated/declaration_resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/declaration_resolver.dart b/pkg/analyzer/lib/src/generated/declaration_resolver.dart
index e240504436e2fd52b19de6186c9e712f313a115c..815b7ea15372a41d38cb74cb8158a5db62fd4a95 100644
--- a/pkg/analyzer/lib/src/generated/declaration_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/declaration_resolver.dart
@@ -160,6 +160,8 @@ class DeclarationResolver extends RecursiveAstVisitor<Object> {
@override
Object visitExportDirective(ExportDirective node) {
super.visitExportDirective(node);
+// var element = node.element as ExportElement;
+// List<ElementAnnotation> annotations = element.metadata;
Brian Wilkerson 2017/04/09 16:01:24 Should we remove these line? (in all three places)
List<ElementAnnotation> annotations =
_enclosingUnit.getAnnotations(node.offset);
if (annotations.isEmpty && node.metadata.isNotEmpty) {
@@ -300,6 +302,8 @@ class DeclarationResolver extends RecursiveAstVisitor<Object> {
@override
Object visitImportDirective(ImportDirective node) {
super.visitImportDirective(node);
+// var element = node.element as ImportElement;
+// List<ElementAnnotation> annotations = element.metadata;
List<ElementAnnotation> annotations =
_enclosingUnit.getAnnotations(node.offset);
if (annotations.isEmpty && node.metadata.isNotEmpty) {
@@ -367,6 +371,8 @@ class DeclarationResolver extends RecursiveAstVisitor<Object> {
@override
Object visitPartDirective(PartDirective node) {
super.visitPartDirective(node);
+// var element = node.element as CompilationUnitElement;
+// List<ElementAnnotation> annotations = element.metadata;
List<ElementAnnotation> annotations =
_enclosingUnit.getAnnotations(node.offset);
if (annotations.isEmpty && node.metadata.isNotEmpty) {

Powered by Google App Engine
This is Rietveld 408576698