[Mono-dev] [PATCH] Bug in MonoType.GetField(FieldInfo)
monoman at gmail.com
Mon Feb 12 08:11:42 EST 2007
Did you fill a bug case with this patch attached, in Mono's bugzilla?
Nowadays is the preferred way to get patches going forth.
I'm not the maintainer for that part, so I can't review and commit it myself.
Thanks for your efforts anyway, Cedric.
On 2/12/07, Cedric Vivier <cedricv at neonux.com> wrote:
> Also forgot to mention the same codepath using
> TypeBuilder.GetField(Type, FieldInfo) works on MS.NET, and that we
> should add some checks to TypeBuilder.GetField(Type, FieldInfo) to
> ensure the type is a generic one, as defined in documentation.
> On 2/9/07, Cedric Vivier <cedricv at neonux.com> wrote:
> > 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,
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
Rafael "Monoman" Teixeira
"The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man." George Bernard Shaw
More information about the Mono-devel-list