[Mono-devel-list] possible bug in S.R.E., class.c::mono_c

Varga Zoltan vargaz at freemail.hu
Tue Jan 20 14:56:44 EST 2004


                                          Hi,

  Does this assertion happen when you call CreateType () on
C2 ? 
If it does, I don't know how this can happen, since classes
inherit
their initial vtable from their parents, and C1 already has an 
implementation for m1, so C2 will inherit that.

                  bye

                       Zoltan


> -----Original Message-----
> From: mono-devel-list-admin at lists.ximian.com
> [mailto:mono-devel-list-admin at lists.ximian.com]On Behalf
Of ext Michal
> Moskal
> Sent: January 17,2004 16:19
> To: mono-devel-list at lists.ximian.com
> Subject: [Mono-devel-list] possible bug in S.R.E.,
> class.c::mono_class_setup_vtable()
> 
> 
> I run into a problem when finalizing type created with SRE
api using
> TypeBuilder.CreateType(). The problem have shown itself
like this:
> 
> #v+
>  at slot 17: _N_m2477 (16) overrides m2 (0)
> no implementation for interface method .I1::m1() in class .C2
> METHOD .ctor()
> METHOD m2()
> METHOD Main()
> METHOD _N_m2477()
>  
> ** ERROR **: file class.c: line 965 
> (mono_class_setup_vtable): should not be reached
> #v-
> 
> This was from my compiler run on source like this:
> 
> #v+
> interface I1 {
>   m1 () : void;
> }
> 
> interface I2 extends I1 {
>   m2 () : void;
> }
> 
> class C1 implements I1 {
>   m1 () : void {}
> }
> 
> class C2 extends C1 implements I2 {
>   m2 () : void {}
> }
> #v-
> 
> As you can see I1.m1 is implemented by inheriting C1.
However my
> compiler generated auxiliary function called
"_N_m1<some_numbers>" to
> implement I1.m1 in C1. Note that C# compiler would
generate "I1.m1" or
> just "m1".
> 
> Now, from my reading of class.c lines 877--939 it seems
that mono
> runtime relies on these names. MS runtime does not. It 
> probably looks at
> what interface method implements, not on how it is called.
> 
> I think it is a bug. I worked it around (using I1.m1 name
for the
> wrapper method), but it still doesn't seem right.
> 
> I'm using mono 0.29.
>  
> -- 
> : Michal Moskal :: http://www.kernel.pl/~malekith : GCS 
> {C,UL}++++$ a? !tv
> : When in doubt, use brute force. -- Ken Thompson : {E-,w}-- 
> {b++,e}>+++ h
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 
> 
> 
> 






More information about the Mono-devel-list mailing list