Index: pkg/compiler/lib/src/constants/constant_constructors.dart |
diff --git a/pkg/compiler/lib/src/constants/constant_constructors.dart b/pkg/compiler/lib/src/constants/constant_constructors.dart |
index 129197f3dd01de426296d5c906755e4828854f42..4628f28629ef34f1e98467950eef14de9372289c 100644 |
--- a/pkg/compiler/lib/src/constants/constant_constructors.dart |
+++ b/pkg/compiler/lib/src/constants/constant_constructors.dart |
@@ -87,6 +87,11 @@ class ConstantConstructorComputer extends SemanticVisitor |
applyParameters(parameters, _); |
ConstructedConstantExpression constructorInvocation = |
applyInitializers(node, _); |
+ constructor.enclosingClass.forEachInstanceField((_, FieldElement field) { |
+ if (!fieldMap.containsKey(field)) { |
+ fieldMap[field] = field.constant; |
+ } |
+ }); |
return new GenerativeConstantConstructor( |
currentClass.thisType, defaultValues, fieldMap, constructorInvocation); |
} |