Summary: Interface methods need to be implemented even if base
                    class already have them impelemented
           Product: D
           Version: 2.023
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

interface IFoo
        int foo();

class FooImpl : IFoo
        int foo() {
                return 42;

class Foo : public FooImpl, public IFoo

void main()
        Foo foo = new Foo();

Error: class A.Foo interface function is not implemented

I believe the following code sample should just work. Otherwise, one have to
explicitly override all the interface methods, which is redundant and adds
runtime cost.

It could be related to bug 2539.


Reply via email to