interface reference not compatible to Object?

Frank Benoit (keinfarbton) benoit at tionex.removethispart.de
Sat Oct 21 02:44:57 PDT 2006


interface I{
    void func();
}
class C : I {
    void func(){
    }
}
void main(){
    C c = new C;
    c.toHash(); // from class Object
    I i = c;
    i.toHash(); // line 14
}
/////////////////////////////
t.d(14): no property 'toHash' for type 't.I'
t.d(14): function expected before (), not 1 of type int


Is this the intended behaviour? If *every* object in D is a Object, then
every interface reference refers to an Object also. This said, the above
should compile?



More information about the Digitalmars-d mailing list