digitalmars.D.learn - Question about inheritance
- Akzwar (13/13) Nov 14 2013 import std.stdio;
- =?UTF-8?B?QWxpIMOHZWhyZWxp?= (3/16) Nov 14 2013 You should talk to Oleg B. ;)
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?
Nov 14 2013
On 11/14/2013 01:41 PM, Akzwar wrote:
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?
You should talk to Oleg B. ;)
Ali
Nov 14 2013








=?UTF-8?B?QWxpIMOHZWhyZWxp?= <acehreli yahoo.com>