http://d.puremagic.com/issues/show_bug.cgi?id=10744

           Summary: Rejects valid interface inheritance + wrong error
                    message
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: yazan.dab...@gmail.com


--- Comment #0 from yazan.dab...@gmail.com 2013-08-02 05:54:37 PDT ---
interface A {
  Foo foo();
  int x(); // must exist for the bug to appear
}

class B : A {
  override Bar foo() { // must return a child of the class returned by the
interface
    return new Bar();
  }
  override int x() { return 0; } // must exist
}

class Foo {
  void foo() {}
}

class Bar : Foo {
  override void foo() {}
}

void main() {}

On DMD GIT HEAD commit 73e375a, the compiler errors with the following message:
main.d(6): Error: class main.B interface function 'int x()' is not implemented

The example compiles successfully on DMD v2.063.2

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to