Index: runtime/vm/parser.cc |
=================================================================== |
--- runtime/vm/parser.cc (revision 41925) |
+++ runtime/vm/parser.cc (working copy) |
@@ -4456,6 +4456,14 @@ |
to_string_func.set_is_visible(false); |
enum_members.AddFunction(to_string_func); |
+ // Clone the hashCode getter function from the helper class. |
+ Function& hash_code_func = Function::Handle(I, |
+ helper_class.LookupDynamicFunctionAllowPrivate(Symbols::hashCode())); |
+ ASSERT(!hash_code_func.IsNull()); |
+ hash_code_func = hash_code_func.Clone(cls); |
+ hash_code_func.set_is_visible(false); |
+ enum_members.AddFunction(hash_code_func); |
+ |
cls.AddFields(enum_members.fields()); |
const Array& functions = |
Array::Handle(I, Array::MakeArray(enum_members.functions())); |