From fca48b75de0dfd8fa83e987dfddfa29345691e87 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Wed, 4 May 2016 11:29:38 -0700 Subject: [PATCH] Skip local functions when dumping inferred types. R=scheglov@google.com Review URL: https://codereview.chromium.org/1948103002 . --- pkg/analyzer/tool/summary/dump_inferred_types.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/analyzer/tool/summary/dump_inferred_types.dart b/pkg/analyzer/tool/summary/dump_inferred_types.dart index 8b38e73d824..5167b104a36 100644 --- a/pkg/analyzer/tool/summary/dump_inferred_types.dart +++ b/pkg/analyzer/tool/summary/dump_inferred_types.dart @@ -63,6 +63,10 @@ class InferredTypeCollector { properties.remove('initializer'); } else if (obj is UnlinkedExecutable) { collectInferredType(obj.inferredReturnTypeSlot, path); + // As a temporary measure, prevent recursion into the executable's local + // variables and local functions, since AST-based type inference doesn't + // infer locals correctly yet. TODO(paulberry): fix if necessary. + properties.remove('localFunctions'); } else if (obj is UnlinkedParam) { collectInferredType(obj.inferredTypeSlot, path); // As a temporary measure, prevent recursion into the parameter's