Index: pkg/analyzer/lib/src/summary/summarize_ast.dart |
diff --git a/pkg/analyzer/lib/src/summary/summarize_ast.dart b/pkg/analyzer/lib/src/summary/summarize_ast.dart |
index 7c359c3e0eebf0e49fb4498a2d5cae9a714f19dd..139a4c2175fb12de7852baa99dae5c58f2d80147 100644 |
--- a/pkg/analyzer/lib/src/summary/summarize_ast.dart |
+++ b/pkg/analyzer/lib/src/summary/summarize_ast.dart |
@@ -1044,15 +1044,15 @@ class _SummarizeAstVisitor extends RecursiveAstVisitor { |
UnlinkedParamBuilder visitDefaultFormalParameter( |
DefaultFormalParameter node) { |
UnlinkedParamBuilder b = node.parameter.accept(this); |
+ b.initializer = serializeInitializerFunction(node.defaultValue); |
if (node.defaultValue != null) { |
// Closures can't appear inside default values, so we don't need a |
// localClosureIndexMap. |
Map<int, int> localClosureIndexMap = null; |
- b.defaultValue = |
+ b.initializer?.bodyExpr = |
serializeConstExpr(localClosureIndexMap, node.defaultValue); |
b.defaultValueCode = node.defaultValue.toSource(); |
} |
- b.initializer = serializeInitializerFunction(node.defaultValue); |
b.codeRange = serializeCodeRange(node); |
return b; |
} |