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

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

Issue 757193002: Fix for resolving super.method() invocations. (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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/incremental_resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/incremental_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698