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

Unified Diff: pkg/analyzer/lib/src/task/incremental_element_builder.dart

Issue 2345773003: Use declared variables to select the correct configuration for resolution (Closed)
Patch Set: Created 4 years, 3 months 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 | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/incremental_element_builder.dart
diff --git a/pkg/analyzer/lib/src/task/incremental_element_builder.dart b/pkg/analyzer/lib/src/task/incremental_element_builder.dart
index bd317cfc80f69ecf53cf8404f2c436aa340ae371..6ae19ff630dcf1151a712895a07898786c242285 100644
--- a/pkg/analyzer/lib/src/task/incremental_element_builder.dart
+++ b/pkg/analyzer/lib/src/task/incremental_element_builder.dart
@@ -244,6 +244,7 @@ class IncrementalCompilationUnitElementBuilder {
}
}
}
+
void processFieldDeclaration(FieldDeclaration node, bool isNew) {
for (VariableDeclaration field in node.fields.variables) {
PropertyInducingElement element = field.element;
@@ -269,6 +270,7 @@ class IncrementalCompilationUnitElementBuilder {
}
}
}
+
void processMethodDeclaration(MethodDeclaration node, bool isNew) {
Element element = node.element;
if (element is MethodElement) {
@@ -287,6 +289,7 @@ class IncrementalCompilationUnitElementBuilder {
}
}
}
+
// Replace new nodes with the identical old nodes.
bool newHasConstructor = false;
for (ClassMember newNode in newClass.members) {
@@ -409,7 +412,11 @@ class IncrementalCompilationUnitElementBuilder {
// URI's must be resolved to the same sources.
if (newDirective is UriBasedDirective &&
oldDirective is UriBasedDirective) {
- if (oldDirective.source != newDirective.source) {
+ Source source(UriBasedDirective directive) =>
+ directive is NamespaceDirective
+ ? directive.selectedSource
+ : directive.uriSource;
+ if (source(oldDirective) != source(newDirective)) {
continue;
}
}
@@ -536,6 +543,7 @@ class IncrementalCompilationUnitElementBuilder {
}
}
}
+
if (node is FieldDeclaration) {
addPropertyAccessors(node.fields);
} else if (node is TopLevelVariableDeclaration) {
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698