[Mono-devel-list] Generics and reflection bug - patch to icall.c/object.c

Joshua Tauberer tauberer at for.net
Sat Jun 5 18:41:59 EDT 2004


In playing around with generics and reflection, I ran into:

** ERROR **: type 0x15 not handled in ves_icall_FieldInfo_SetValueInternal

I was using FieldInfo.SetValue, passing an instance of a generic class.

Type 0x15 is MONO_TYPE_GENERICINST.  After I fixed that, I got:

** ERROR **: file object.c: line 1041 (set_value): should not be reached

Attached is a patch to fix these (it corrects GetValueInternal also).  I 
can commit if it's OK.

There are a few other switch statements in object.c that don't mention 
MONO_TYPE_GENERICINST.  I don't know what those functions do and I don't 
have a test case for them, so I didn't touch them.

-- 
- Joshua Tauberer

http://taubz.for.net

** Nothing Unreal Exists **


-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff.patch
Type: text/x-patch
Size: 1800 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040605/5f054e9a/attachment.bin 


More information about the Mono-devel-list mailing list