| 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 f3f99eb7c7da6fff13f134f6c816182faec37b49..3b6709af68b0bb570db5c60a9a99219e4ef0adbf 100644
|
| --- a/pkg/analyzer/lib/src/generated/incremental_resolver.dart
|
| +++ b/pkg/analyzer/lib/src/generated/incremental_resolver.dart
|
| @@ -393,6 +393,7 @@ class DeclarationMatcher extends RecursiveAstVisitor {
|
| element = _findElement(_enclosingClass.fields, name);
|
| }
|
| // verify
|
| + PropertyInducingElement newElement = node.name.staticElement;
|
| _assertNotNull(element);
|
| _processElement(element);
|
| _assertEquals(node.isConst, element.isConst);
|
| @@ -405,6 +406,9 @@ class DeclarationMatcher extends RecursiveAstVisitor {
|
| element.type);
|
| // matches, restore the existing element
|
| node.name.staticElement = element;
|
| + if (element is VariableElementImpl) {
|
| + (element as VariableElementImpl).initializer = newElement.initializer;
|
| + }
|
| }
|
|
|
| @override
|
| @@ -911,7 +915,8 @@ class IncrementalResolver {
|
| node is ConstructorDeclaration ||
|
| node is FunctionDeclaration ||
|
| node is FunctionTypeAlias ||
|
| - node is MethodDeclaration;
|
| + node is MethodDeclaration ||
|
| + node is TopLevelVariableDeclaration;
|
|
|
| void _fillResolutionQueue(DeclarationMatcher matcher) {
|
| HashSet<Element> removedElements = matcher._removedElements;
|
|
|