interface and class inheritance
Jacob Carlborg
doob at me.com
Fri Nov 15 00:12:54 PST 2013
On 2013-11-14 23:17, Oleg B wrote:
>> Oh sorry i mean
>>
>> interface A {
>> void funcA();
>> }
>>
>> class B : A {
>> final void funcA() { writeln( "B.funcA()" ); }
>> }
>>
>> class C : B {
>> }
>
> we can't change anything in class B
I would have moved "final void funcA()" to a template and mixin it in
both B and C, but if you cannot change B that won't work.
--
/Jacob Carlborg
More information about the Digitalmars-d-learn
mailing list