[Mono-dev] Bug in MonoType.GetField(FieldInfo)

Cedric Vivier cedricv at neonux.com
Fri Feb 9 17:29:03 EST 2007


Hi all!

We - as in mono+boo users;) - have been hitting a blocking compilation
bug on the latest boo revisions supporting generics generators.

The bug is related to method MonoType.GetField(FieldInfo) only
returning public fields (because of the use of the default public-only
BindingFlags as used in the Type.GetField(string) method), whereas
FieldInfo can obviously "reference" a non-public field too.
Thus, we were getting a "field not found" exception from caller
TypeBuilder.GetField(Type, FieldInfo) when building a generics class
with a non-public field.

Attached a patch fixing this, with the corresponding testcase :)

Regards,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MonoType.patch
Type: text/x-patch
Size: 1883 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070209/382f798a/attachment.bin 


More information about the Mono-devel-list mailing list