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

Unified Diff: pkg/analyzer/lib/src/generated/static_type_analyzer.dart

Issue 814533005: Incrementally resolve users of a changed method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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
Index: pkg/analyzer/lib/src/generated/static_type_analyzer.dart
diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
index 084b65de3fc5ede09fe750d3c5687810331a48ae..ff88128b907fa5ce74f163dc6047eac65a790e32 100644
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
@@ -1171,7 +1171,12 @@ class StaticTypeAnalyzer extends SimpleAstVisitor<Object> {
}
if (propagatedType != null &&
propagatedType.isMoreSpecificThan(staticType)) {
+ // TODO(scheglov) "isMoreSpecificThan" returns "true" when
+ // "propagatedType" is the same as "staticType".
+ // Not sure if it is useful to record.
Brian Wilkerson 2014/12/19 15:03:29 I thought that we were not recording a propagated
_recordPropagatedType(node, propagatedType);
+ } else {
+ node.propagatedType = null;
}
return null;
}
@@ -1660,6 +1665,8 @@ class StaticTypeAnalyzer extends SimpleAstVisitor<Object> {
void _recordPropagatedType(Expression expression, DartType type) {
if (type != null && !type.isDynamic && !type.isBottom) {
expression.propagatedType = type;
+ } else {
+ expression.propagatedType = null;
}
}

Powered by Google App Engine
This is Rietveld 408576698