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

Unified Diff: pkg/analyzer/lib/src/dart/ast/utilities.dart

Issue 2093473002: Clean up some supposedly failing tests (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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/ast/utilities.dart
diff --git a/pkg/analyzer/lib/src/dart/ast/utilities.dart b/pkg/analyzer/lib/src/dart/ast/utilities.dart
index e3e379f02c00eeb57994605db6ada8deac9ad451..7b715e206729371dc35f874fcc217d69e716623e 100644
--- a/pkg/analyzer/lib/src/dart/ast/utilities.dart
+++ b/pkg/analyzer/lib/src/dart/ast/utilities.dart
@@ -2501,6 +2501,9 @@ class ElementLocator_ElementMapper extends GeneralizingAstVisitor<Element> {
node.element;
@override
+ Element visitExportDirective(ExportDirective node) => node.element;
+
+ @override
Element visitFunctionDeclaration(FunctionDeclaration node) => node.element;
@override
@@ -2532,6 +2535,8 @@ class ElementLocator_ElementMapper extends GeneralizingAstVisitor<Element> {
if (element is LibraryElement) {
return element.definingCompilationUnit;
}
+ } else if (grandParent is LibraryDirective) {
+ return grandParent.element;
}
}
return node.bestElement;
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/all_the_rest_test.dart » ('j') | pkg/analyzer/test/generated/all_the_rest_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698