[Mono-devel-list] [GENERICS] MonoGenericClass.GetParentType()

Martin Baulig martin at ximian.com
Wed Jun 15 11:03:22 EDT 2005


On Tue, 2005-06-14 at 20:46 +0200, Michal Moskal wrote:

> I've run into strange SEGV in MonoGenericClass.initialize(). After a few
> hours of debugging I have found that GetParentType() sometimes returns
> MonoType and not MonoGenericType as it is supposed to.
> 
> The MonoType is taken from domain->type_hash in mono_type_get_object,
> maybe this is the source of the problem?
> 
> MonoGenericClass is constructed from a TypeBuilder, while its parent is
> loaded from external library.

Hello,

do you have a test case for this ?

> Or maybe this is just normal, and my solution (to make GetParentType
> return System.Type and use "as MonoGenericClass") is right?

GetParentType() is supposed to return a MonoGenericClass, not a
MonoType; we have to ensure this in unmanaged land.  I'm about to commit
a patch to icall.c - maybe this'll fix your problem.  If not, please
send me a small test case so I can have a look at this.

Martin





More information about the Mono-devel-list mailing list