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

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

Issue 1146413003: Depend on LIBRARY_ELEMENT5 to invalidate CONSTRUCTORS. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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 | no next file » | 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 f8fef187a883d6f9a81528a62f682f0a302f5347..3f3eeeb2cec9ad75c41412ea41d247a8efba0e15 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -501,20 +501,22 @@ class BuildClassConstructorsTask extends SourceBasedAnalysisTask {
* given [classElement].
*/
static Map<String, TaskInput> buildInputs(ClassElement classElement) {
- // TODO(scheglov) Here we implicitly depend on LIBRARY_ELEMENT5, i.e. that
- // "supertype" for the "classElement" is set.
- // We need to make it an explicit dependency.
+ Source librarySource = classElement.library.source;
DartType superType = classElement.supertype;
if (superType is InterfaceType) {
if (classElement.isTypedef || classElement.mixins.isNotEmpty) {
ClassElement superElement = superType.element;
return <String, TaskInput>{
+ 'libraryDep': LIBRARY_ELEMENT5.of(librarySource),
SUPER_CONSTRUCTORS: CONSTRUCTORS.of(superElement)
};
}
}
- // No implicit constructors, no inputs required.
- return <String, TaskInput>{};
+ // No implicit constructors.
+ // Depend on LIBRARY_ELEMENT5 for invalidation.
+ return <String, TaskInput>{
+ 'libraryDep': LIBRARY_ELEMENT5.of(librarySource)
+ };
}
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698