On 09/15/06 Bruce Wilkie wrote: > i'm seeing a bug where setting a static field uses the class the field is on: > -------------- > MonoVTable *vtable = mono_class_vtable (mono_object_domain (field), > field->klass); > -------------- > > consider, however, that the static field is coming from a base class. > in this case, it seems that vtable should really be the vtable of the > base class?
Yes, if a static field is defined in class A, you need to use the vtable of class A to access it. To get the class that defines a field, use the parent member of the MonoClassField structure. I have fixed the code in metadata/icall.c: do you have a test case where you get a MonoReflectionField object for a static field with klass being a derived class? Thanks. lupus -- ----------------------------------------------------------------- [EMAIL PROTECTED] debian/rules [EMAIL PROTECTED] Monkeys do it better _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
