| Index: pkg/analyzer/lib/src/generated/error_verifier.dart
|
| diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
|
| index 58ff5b94e8f91f4efedefa087fb25bf3d45002b9..4bf1d0e16a737803754f650e243a5c156c07efbb 100644
|
| --- a/pkg/analyzer/lib/src/generated/error_verifier.dart
|
| +++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
|
| @@ -208,7 +208,13 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
|
| * 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.
|
| + */
|
| + ClassElement _enclosingEnum;
|
|
|
| /**
|
| * The method or function that we are currently visiting, or `null` if we are
|
| @@ -622,13 +628,12 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
|
|
|
| @override
|
| Object visitEnumDeclaration(EnumDeclaration node) {
|
| - ClassElementImpl outerClass = _enclosingClass;
|
| + ClassElement outerEnum = _enclosingEnum;
|
| try {
|
| - _isInNativeClass = false;
|
| - _enclosingClass = AbstractClassElementImpl.getImpl(node.element);
|
| + _enclosingEnum = node.element;
|
| return super.visitEnumDeclaration(node);
|
| } finally {
|
| - _enclosingClass = outerClass;
|
| + _enclosingEnum = outerEnum;
|
| }
|
| }
|
|
|
| @@ -5364,6 +5369,9 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
|
| if (identical(enclosingElement, _enclosingClass)) {
|
| return;
|
| }
|
| + if (identical(enclosingElement, _enclosingEnum)) {
|
| + return;
|
| + }
|
| if (enclosingElement is! ClassElement) {
|
| return;
|
| }
|
|
|