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

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

Issue 2160673002: Another fix incremental constants - annotations should use the old unit element. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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/dart/element/element.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 abd306798383df8b047545d96ef73893ad5249ce..d20ce0bbc37e97abb74d04e1072ca9e05ad5e558 100644
--- a/pkg/analyzer/lib/src/task/incremental_element_builder.dart
+++ b/pkg/analyzer/lib/src/task/incremental_element_builder.dart
@@ -163,6 +163,12 @@ class IncrementalCompilationUnitElementBuilder {
new ConstantFinder(unitElement.context, unitSource, librarySource);
oldUnit.accept(finder);
unitConstants.addAll(finder.constantsToCompute);
+ // Update annotation constants to using the old unit element.
+ for (ConstantEvaluationTarget constant in unitConstants) {
+ if (constant is ElementAnnotationImpl) {
+ constant.compilationUnit = unitElement;
+ }
+ }
}
ClassElementDelta _processClassMembers(
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.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