| Index: pkg/analyzer/lib/src/generated/incremental_resolver.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/incremental_resolver.dart b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
|
| index fe67af5aa7f0f803f6e178ea7ba49bdee2bc5d92..b23d188b589af0cc66df8b9099a507e318a5be52 100644
|
| --- a/pkg/analyzer/lib/src/generated/incremental_resolver.dart
|
| +++ b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
|
| @@ -74,7 +74,13 @@ class DeclarationMatcher extends RecursiveAstVisitor {
|
| * The class containing the AST nodes being visited, or `null` if we are not
|
| * in the scope of a class.
|
| */
|
| - AbstractClassElementImpl _enclosingClass;
|
| + ClassElementImpl _enclosingClass;
|
| +
|
| + /**
|
| + * The enum containing the AST nodes being visited, or `null` if we are not
|
| + * in the scope of an enum.
|
| + */
|
| + EnumElementImpl _enclosingEnum;
|
|
|
| /**
|
| * The parameter containing the AST nodes being visited, or `null` if we are not in the
|
| @@ -214,7 +220,7 @@ class DeclarationMatcher extends RecursiveAstVisitor {
|
| @override
|
| visitEnumConstantDeclaration(EnumConstantDeclaration node) {
|
| String name = node.name.name;
|
| - FieldElement element = _findElement(_enclosingClass.fields, name);
|
| + FieldElement element = _findElement(_enclosingEnum.fields, name);
|
| _processElement(element);
|
| }
|
|
|
| @@ -222,7 +228,7 @@ class DeclarationMatcher extends RecursiveAstVisitor {
|
| visitEnumDeclaration(EnumDeclaration node) {
|
| String name = node.name.name;
|
| ClassElement element = _findElement(_enclosingUnit.enums, name);
|
| - _enclosingClass = element;
|
| + _enclosingEnum = element;
|
| _processElement(element);
|
| _assertTrue(element.isEnum);
|
| super.visitEnumDeclaration(node);
|
|
|