| 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;
|
|
|