Index: pkg/analyzer/lib/src/summary/resynthesize.dart |
diff --git a/pkg/analyzer/lib/src/summary/resynthesize.dart b/pkg/analyzer/lib/src/summary/resynthesize.dart |
index d0d4819279d16e3119a7551da04a7f4c67d77eb5..d8e3f2e23bf2b2dc141764a8c09e36f83942f0f2 100644 |
--- a/pkg/analyzer/lib/src/summary/resynthesize.dart |
+++ b/pkg/analyzer/lib/src/summary/resynthesize.dart |
@@ -2332,9 +2332,9 @@ class _UnitResynthesizer { |
new DefaultFieldFormalParameterElementImpl( |
serializedParameter.name, nameOffset); |
initializingParameter = defaultParameter; |
- if (serializedParameter.defaultValue != null) { |
+ if (serializedParameter.initializer?.bodyExpr != null) { |
defaultParameter.constantInitializer = _buildConstExpression( |
- enclosingElement, serializedParameter.defaultValue); |
+ enclosingElement, serializedParameter.initializer.bodyExpr); |
defaultParameter.defaultValueCode = |
serializedParameter.defaultValueCode; |
} |