Satisfying inheritence requirements

Jason House jason.james.house at gmail.com
Tue Oct 9 12:32:32 PDT 2007


When inheriting from a super class and an interface, I can't seem to get aliasing to work (to satisfy the interface requirements).  Below is a simple session demonstrating the problem.  I've tested with dmd 1.018, 1.020, and 2.003.

$ cat test.d
interface Foo{ int bar(); }
class A : Foo{ int bar(){return 1;} }
class B : A, Foo{ alias A.bar bar; }
void main(){}

$ dmd test.d
test.d(3): class test.B interface function Foo.bar is not implemented


More information about the Digitalmars-d-learn mailing list