Implementing interfaces using alias this
ketmar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Jun 14 05:38:27 PDT 2017
Mike B Johnson wrote:
> I don't think it has to do with pasting code.
>
> d.Quack() is well defined through the alias. Inheritance requires that a
> Quack() exists, and it does, through the alias.
>
> The compiler could easily create an implementation wrapper that uses the
> alias this.
this is called "code pasting".
More information about the Digitalmars-d-learn
mailing list