implimenting interface function by inheriting from other class

Alexey invalid at email.address
Sat Aug 21 20:35:43 UTC 2021


Hello
```D
interface Int
{
     void coolFunc();
}

class C1
{
     void coolFunc()
     {
         return;
     }
}

class C2 : C1, Int
{

}

void main()
{
     auto c = new C2;
}
```
dmd says it's not Ok:
t.d(14): Error: class `t.C2` interface function `void coolFunc()` 
is not implemented

how to make dmd happy?


More information about the Digitalmars-d-learn mailing list