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

Unified Diff: pkg/analyzer/lib/src/generated/resolver.dart

Issue 1125613003: Make sure to visit function annotations in ElementBuilder. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/non_error_resolver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 926244b5c090a74cbdfd43448b684d4ccdb25d35..51bd1a3be18becbe100bdcb2921ad99ad90e79ac 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -2670,7 +2670,7 @@ class ElementBuilder extends RecursiveAstVisitor<Object> {
bool wasInFunction = _inFunction;
_inFunction = true;
try {
- _visitChildren(holder, expression);
+ _visitChildren(holder, node);
} finally {
_inFunction = wasInFunction;
}
@@ -2765,6 +2765,11 @@ class ElementBuilder extends RecursiveAstVisitor<Object> {
@override
Object visitFunctionExpression(FunctionExpression node) {
+ if (node.parent is FunctionDeclaration) {
+ // visitFunctionDeclaration has already created the element for the
+ // declaration. We just need to visit children.
+ return super.visitFunctionExpression(node);
+ }
ElementHolder holder = new ElementHolder();
bool wasInFunction = _inFunction;
_inFunction = true;
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/non_error_resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698