[Mono-devel-list] possible bug in S.R.E., class.c::mono_class_setup_vtable()
Michal Moskal
malekith at pld-linux.org
Sat Jan 17 10:19:05 EST 2004
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
More information about the Mono-devel-list
mailing list