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

Paolo Molaro lupus at ximian.com
Sun Jun 6 04:55:56 EDT 2004


On 06/05/04 Joshua Tauberer wrote:
> 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.

[...]
> Index: icall.c
> ===================================================================
> RCS file: /cvs/public/mono/mono/metadata/icall.c,v
> retrieving revision 1.491
> diff -u -r1.491 icall.c
> --- icall.c	5 Jun 2004 10:42:37 -0000	1.491
> +++ icall.c	5 Jun 2004 21:48:12 -0000
> @@ -1249,6 +1249,7 @@
>  	switch (cf->type->type) {
>  	case MONO_TYPE_STRING:
>  	case MONO_TYPE_OBJECT:
> +	case MONO_TYPE_GENERICINST:
>  	case MONO_TYPE_CLASS:
>  	case MONO_TYPE_ARRAY:
>  	case MONO_TYPE_SZARRAY:

This kind of changes are likely wrong for instantiations of
generic structs. Could you cook up a few tests for them?
Maybe also non-generic structs need tests here.

lupus

-- 
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better



More information about the Mono-devel-list mailing list