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

import std.stdio;

interface IDuck
{
    void quack();
}

class Test(T) : IDuck
{
    T data;
    alias data this;
}

struct Duck
{
    void quack()
    {
        writeln("Quack");
    }
}


void main()
{
        Test!Duck d;
}

Reply via email to