www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16318] New: inherit from interface via abstract class

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 puremagic.com
          Reporter: lodovico giaretart.net
                CC: lodovico 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.

--
Jul 24 2016