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

Unified Diff: pkg/analyzer/tool/summary/dump_inferred_types.dart

Issue 1939973002: Skip more initializers when dumping inferred types. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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/tool/summary/dump_inferred_types.dart
diff --git a/pkg/analyzer/tool/summary/dump_inferred_types.dart b/pkg/analyzer/tool/summary/dump_inferred_types.dart
index 18c0ef47226a08286b0eeecb0575603631079a79..8b38e73d824b9721acb9605abd8ac2fc00779fd3 100644
--- a/pkg/analyzer/tool/summary/dump_inferred_types.dart
+++ b/pkg/analyzer/tool/summary/dump_inferred_types.dart
@@ -57,6 +57,10 @@ class InferredTypeCollector {
SummaryClass obj, Map<String, Object> properties, String path) {
if (obj is UnlinkedVariable) {
collectInferredType(obj.inferredTypeSlot, path);
+ // As a temporary measure, prevent recursion into the variable's
+ // initializer, since AST-based type inference doesn't infer its type
+ // correctly yet. TODO(paulberry): fix.
+ properties.remove('initializer');
} else if (obj is UnlinkedExecutable) {
collectInferredType(obj.inferredReturnTypeSlot, path);
} else if (obj is UnlinkedParam) {
« 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