[Issue 16318] New: inherit from interface via abstract class

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Jul 24 12:09:51 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16318

          Issue ID: 16318
           Summary: inherit from interface via abstract class
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: spec
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: lodovico at giaretart.net
                CC: lodovico at giaretart.net

interface Foo
{
    void foo();
}
abstract class Bar: Foo
{
    // the following line eliminates the error, if uncommented
    // abstract override void foo();
}
class Baz: Bar
{
    override void foo();
    // error: Baz.foo does not override any function;
    // did you meant to override Foo.foo?
}

Why doesn't this work? Probably there's a good reason, but I can't find it.
I would think that the commented-out line was implicit, but it is not.

--


More information about the Digitalmars-d-bugs mailing list