Chromium Code Reviews| 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 58d2fcf5166ea04dc3b7b95413109003feca5272..c194f4c916401b5fb21fd4e6807c3476393dbcea 100644 |
| --- a/pkg/analyzer/lib/src/generated/error_verifier.dart |
| +++ b/pkg/analyzer/lib/src/generated/error_verifier.dart |
| @@ -271,27 +271,6 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> { |
| _typeProvider.stringType]; |
| } |
| - /** |
| - * Initialize this instance with the given [ClassDeclaration]. |
| - */ |
| - void initClassDeclaration(ClassDeclaration node) { |
| - _isInNativeClass = node.nativeClause != null; |
| - _enclosingClass = node.element; |
| - // initialize initialFieldElementsMap |
| - if (_enclosingClass != null) { |
| - List<FieldElement> fieldElements = _enclosingClass.fields; |
| - _initialFieldElementsMap = new HashMap<FieldElement, INIT_STATE>(); |
| - for (FieldElement fieldElement in fieldElements) { |
| - if (!fieldElement.isSynthetic) { |
| - _initialFieldElementsMap[fieldElement] = |
| - fieldElement.initializer == null ? |
| - INIT_STATE.NOT_INIT : |
| - INIT_STATE.INIT_IN_DECLARATION; |
| - } |
| - } |
| - } |
| - } |
| - |
| @override |
| Object visitAnnotation(Annotation node) { |
| _checkForInvalidAnnotationFromDeferredLibrary(node); |
| @@ -451,7 +430,21 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> { |
| _checkImplementsFunctionWithoutCall(node); |
| } |
| } |
| - initClassDeclaration(node); |
| + _isInNativeClass = node.nativeClause != null; |
|
Brian Wilkerson
2014/11/26 15:30:51
I must be missing something, but... Why did you in
scheglov
2014/11/26 15:56:18
Well, in this class implementations of visitClassD
|
| + _enclosingClass = node.element; |
| + // initialize initialFieldElementsMap |
| + if (_enclosingClass != null) { |
| + List<FieldElement> fieldElements = _enclosingClass.fields; |
| + _initialFieldElementsMap = new HashMap<FieldElement, INIT_STATE>(); |
| + for (FieldElement fieldElement in fieldElements) { |
| + if (!fieldElement.isSynthetic) { |
| + _initialFieldElementsMap[fieldElement] = |
| + fieldElement.initializer == null ? |
| + INIT_STATE.NOT_INIT : |
| + INIT_STATE.INIT_IN_DECLARATION; |
| + } |
| + } |
| + } |
| _checkForFinalNotInitializedInClass(node); |
| _checkForDuplicateDefinitionInheritance(); |
| _checkForConflictingInstanceMethodSetter(node); |
| @@ -463,6 +456,28 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> { |
| } |
| } |
| + /** |
| + * Implementation of this method should be synchronized with |
| + * [visitClassDeclaration]. |
| + */ |
| + visitClassDeclarationIncrementally(ClassDeclaration node) { |
| + _isInNativeClass = node.nativeClause != null; |
| + _enclosingClass = node.element; |
| + // initialize initialFieldElementsMap |
| + if (_enclosingClass != null) { |
| + List<FieldElement> fieldElements = _enclosingClass.fields; |
| + _initialFieldElementsMap = new HashMap<FieldElement, INIT_STATE>(); |
| + for (FieldElement fieldElement in fieldElements) { |
| + if (!fieldElement.isSynthetic) { |
| + _initialFieldElementsMap[fieldElement] = |
| + fieldElement.initializer == null ? |
| + INIT_STATE.NOT_INIT : |
| + INIT_STATE.INIT_IN_DECLARATION; |
| + } |
| + } |
| + } |
| + } |
| + |
| @override |
| Object visitClassTypeAlias(ClassTypeAlias node) { |
| _checkForBuiltInIdentifierAsName( |