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

Unified Diff: pkg/analyzer/lib/src/task/dart.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 | « no previous file | pkg/analyzer/lib/src/task/incremental_element_builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/dart.dart
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
index 4dde93d09a6e0d4e3cd3ad6d340bf7f17321b50b..feea05b8f986880ea294efc1acbd8d14ad233038 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -2606,6 +2606,18 @@ class DartDelta extends Delta {
return true;
}
}
+ // Resolution must be performed when the unnamed constructor of
+ // an instantiated class is added/changed/removed.
+ // TODO(scheglov) Use only instantiations with default constructor.
+ for (String name in references.instantiatedNames) {
+ for (ClassElementDelta classDelta in changedClasses.values) {
+ if (classDelta.name == name && classDelta.hasUnnamedConstructorChange) {
+ _log(() =>
+ '$refLibrary is affected by the default constructor of $name');
+ return true;
+ }
+ }
+ }
return false;
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/incremental_element_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698