reimplementing an interface in a derived class

Neia Neutuladh neia at ikeran.org
Thu Jan 3 23:23:12 UTC 2019


On Thu, 03 Jan 2019 22:30:48 +0000, kdevel wrote:
> class A : D {
>      int foo() { return 1; }
> }
> 
> class B : A, D {
> [...]
>
> What is the meaning of the ", D"? It does not seem to make a difference
> if it is omitted.

B must provide its own implementation of D. It can't simply use A's 
implementation.


More information about the Digitalmars-d-learn mailing list