Question about inheritance

Akzwar akzhigitov.anton at yandex.ru
Thu Nov 14 13:41:27 PST 2013


import std.stdio;

interface A { void funcA(); }
class B { final void funcA() { writeln( "B.funcA()" ); } }

class C: B, A { }

void main()
{
     auto c = new C;
     c.funcA();
}

$ rdmd interface.d
interface.d(6): Error: class interface.C interface function 'void 
funcA()' is not implemented

Why is this so? How can I use inheritance in this situation?


More information about the Digitalmars-d-learn mailing list