| Index: pkg/analyzer/lib/src/dart/element/builder.dart
|
| diff --git a/pkg/analyzer/lib/src/dart/element/builder.dart b/pkg/analyzer/lib/src/dart/element/builder.dart
|
| index ef51b61588dfabe192afde17113f7605b5bdb082..594fdf18cf0640bef2e3c2b776fef54878bd1704 100644
|
| --- a/pkg/analyzer/lib/src/dart/element/builder.dart
|
| +++ b/pkg/analyzer/lib/src/dart/element/builder.dart
|
| @@ -331,6 +331,24 @@ class ElementBuilder extends RecursiveAstVisitor<Object> {
|
| }
|
|
|
| @override
|
| + Object visitAnnotation(Annotation node) {
|
| + // Although it isn't valid to do so because closures are not constant
|
| + // expressions, it's possible for one of the arguments to the constructor to
|
| + // contain a closure. Wrapping the processing of the annotation this way
|
| + // prevents these closures from being added to the list of functions in the
|
| + // annotated declaration.
|
| + ElementHolder holder = new ElementHolder();
|
| + ElementHolder previousHolder = _currentHolder;
|
| + _currentHolder = holder;
|
| + try {
|
| + super.visitAnnotation(node);
|
| + } finally {
|
| + _currentHolder = previousHolder;
|
| + }
|
| + return null;
|
| + }
|
| +
|
| + @override
|
| Object visitCatchClause(CatchClause node) {
|
| SimpleIdentifier exceptionParameter = node.exceptionParameter;
|
| if (exceptionParameter != null) {
|
|
|