2004-07-12 Martin Baulig <martin@ximian.com>
authorMartin Baulig <martin@novell.com>
Mon, 12 Jul 2004 00:16:06 +0000 (00:16 -0000)
committerMartin Baulig <martin@novell.com>
Mon, 12 Jul 2004 00:16:06 +0000 (00:16 -0000)
* reflection.c (mono_field_get_object): If we have
`field->generic_info', take the attributes from
`field->generic_info->generic_type'.

svn path=/trunk/mono/; revision=31017

mono/metadata/ChangeLog
mono/metadata/reflection.c

index 0240924a985595c1f5111887e714cb06853381eb..b43a9bb0e4da08c38b050b37e0d481417aa45b76 100644 (file)
@@ -1,3 +1,9 @@
+2004-07-12  Martin Baulig  <martin@ximian.com>
+
+       * reflection.c (mono_field_get_object): If we have
+       `field->generic_info', take the attributes from
+       `field->generic_info->generic_type'.    
+
 2004-07-12  Martin Baulig  <martin@ximian.com>
 
        * mono-debug.c (mono_debug_init): Don't take a `MonoDomain *'.
index 762948309234864a6e450d32c1e6c1ad55aa2538..3238759cad6d046d8527745af7f117bfb758bc27 100644 (file)
@@ -5190,7 +5190,10 @@ mono_field_get_object (MonoDomain *domain, MonoClass *klass, MonoClassField *fie
        res->klass = klass;
        res->field = field;
        res->name = mono_string_new (domain, field->name);
-       res->attrs = field->type->attrs;
+       if (field->generic_info)
+               res->attrs = field->generic_info->generic_type->attrs;
+       else
+               res->attrs = field->type->attrs;
        res->type = mono_type_get_object (domain, field->type);
        CACHE_OBJECT (field, res, klass);
        return res;