Extending an interface or class outside of it

Ali Çehreli acehreli at yahoo.com
Mon Nov 25 21:03:45 PST 2013


On 11/25/2013 04:27 PM, Frustrated wrote:
> I have some type of automatically generated interface using a mixin an
> would like to extend them after they are generated:
>
>      mixin(GenerateMyInterface!(...));
>
>      ... <Here I would like to add some members/methods to MyInterface
> which was generated above> ...
>
> Is this at all possible?
>
>

Just inherit from it:

interface MyInterface
{
     void foo();
}

interface EvenMoreMyInterface : MyInterface
{
     void bar();
}

Ali



More information about the Digitalmars-d-learn mailing list