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

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

Issue 2156873002: Invalidate resolution if a unit instantiate a class with the unnamed constructor change. (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/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 65de1a56c172dc04dea30e692fb500dc0edd8f36..eeee10a2b3297e948074e3c0f695e371ed851444 100644
--- a/pkg/analyzer/lib/src/task/incremental_element_builder.dart
+++ b/pkg/analyzer/lib/src/task/incremental_element_builder.dart
@@ -34,6 +34,7 @@ class ClassElementDelta {
final List<ConstructorElement> addedConstructors = <ConstructorElement>[];
final List<ConstructorElement> removedConstructors = <ConstructorElement>[];
+ bool hasUnnamedConstructorChange = false;
final List<MethodElement> addedMethods = <MethodElement>[];
final List<MethodElement> removedMethods = <MethodElement>[];
@@ -344,7 +345,11 @@ class IncrementalCompilationUnitElementBuilder {
new ConstructorElementImpl.forNode(null);
constructor.synthetic = true;
classElement.constructors = <ConstructorElement>[constructor];
+ classDelta.addedConstructors.add(constructor);
}
+ classDelta.hasUnnamedConstructorChange =
+ classDelta.addedConstructors.any((c) => c.name == '') ||
+ classDelta.removedConstructors.any((c) => c.name == '');
// OK
return classDelta;
}
« 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