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

Unified Diff: pkg/analyzer/lib/src/summary/summarize_ast.dart

Issue 2010993002: Migrate UnlinkedParam.defaultValue to UnlinkedExecutable.bodyExpr. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
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;
}
« no previous file with comments | « pkg/analyzer/lib/src/summary/resynthesize.dart ('k') | pkg/analyzer/lib/src/summary/summarize_elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698