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

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

Issue 757743004: Update errors during incremental resolution. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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/error_verifier.dart
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index be1b4a265862fadedd0587aeffd6d44ffdd53059..58d2fcf5166ea04dc3b7b95413109003feca5272 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -271,6 +271,27 @@ 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);
@@ -430,19 +451,7 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
_checkImplementsFunctionWithoutCall(node);
}
}
- // 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;
- }
- }
- }
+ initClassDeclaration(node);
_checkForFinalNotInitializedInClass(node);
_checkForDuplicateDefinitionInheritance();
_checkForConflictingInstanceMethodSetter(node);

Powered by Google App Engine
This is Rietveld 408576698