Implementing interfaces using alias this

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jun 14 02:41:49 PDT 2017


Balagopal Komarath wrote:

> Why doesn't this work? The Test!Duck type has a void quack() method but 
> the compiler says it is not implemented.

'cause `alias this` is *not* a tool that can be used to emulate 
inheritance. no, `quack` is NOT impemented. `alias this` won't 
automagically paste the code.


More information about the Digitalmars-d-learn mailing list