[code]
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();
}
[code/]

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

if swap A and B
[code]
class C: A, B { }
[code/]

$ dmd -run interface.d
interface.d(6): Error: class interface.C base type must be interface, not interface.B

how to workaround this without change in class B and interface A?

Reply via email to