Index: pkg/compiler/lib/src/kernel/element_map_impl.dart |
diff --git a/pkg/compiler/lib/src/kernel/element_map_impl.dart b/pkg/compiler/lib/src/kernel/element_map_impl.dart |
index ceed52be3b4225a171c7e00c8eba5819b8e2d1e7..e7d3cd0d506cd82b588be8635cb46f08e514bb25 100644 |
--- a/pkg/compiler/lib/src/kernel/element_map_impl.dart |
+++ b/pkg/compiler/lib/src/kernel/element_map_impl.dart |
@@ -680,6 +680,14 @@ class KernelToElementMapImpl extends KernelToElementMapMixin { |
return getFieldConstantValue(data.node) != null; |
} |
+ ConstantValue getConstantFieldInitializer(KField field) { |
+ _FieldData data = _memberList[field.memberIndex]; |
+ ConstantValue value = getFieldConstantValue(data.node); |
+ assert(value != null, |
+ failedAt(field, "Field $field doesn't have a constant initial value.")); |
+ return value; |
+ } |
+ |
TypeVariableEntity getTypeVariable(ir.TypeParameter node) => |
_getTypeVariable(node); |