I have an interface A which declares a certain function. A second interface B inherits from A and wishes to provide a default implementation for that function. How can I achieve this? I'm facing an error when I try this:

interface A
{
    int func(int);
}

interface B : A
{
    final int func(int)
    {
        return 0;
    }
}

class C : B
{
}

rdmd it.d:
it.d(14): Error: class it.C interface function 'int func(int)' is not implemented

Thanks,
Saurabh

Reply via email to