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

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

Issue 2029303002: Start pulling apart ClassElementImpl and EnumElementImpl. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
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);

Powered by Google App Engine
This is Rietveld 408576698