Index: pkg/analyzer/lib/src/fasta/ast_builder.dart |
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart |
index b3896c96a8727f1d38e1b56e7093a83ddf815c77..67f6f912af0e339720e44d3ba504f0c6f28e02e4 100644 |
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart |
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart |
@@ -227,8 +227,6 @@ class AstBuilder extends ScopeListener { |
assert(element != null); |
identifier.staticElement = element; |
} |
- } else if (context == IdentifierContext.classDeclaration) { |
- className = identifier.name; |
} |
push(identifier); |
} |
@@ -1337,6 +1335,12 @@ class AstBuilder extends ScopeListener { |
beginToken, popList(memberCount) ?? <ClassMember>[], endToken)); |
} |
+ @override |
+ void beginClassDeclaration(Token beginToken, Token name) { |
+ assert(className == null); |
+ className = name.lexeme; |
+ } |
+ |
@override |
void endClassDeclaration( |
int interfacesCount, |