[Issue 12621] New: [Reg]: covariance no longer checked for function overriding

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Apr 22 16:48:50 PDT 2014


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

          Issue ID: 12621
           Summary: [Reg]: covariance no longer checked for function
                    overriding
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: bugzilla at digitalmars.com

class C15
{
    void foo() pure;
    void bar();
}

class D15 : C15
{
    override void foo();       // should issue a covariant error
    override void bar() pure;  // not an error - pure can override impure
}

dmd used to diagnose this correctly. Same issue with nothrow and @safe
attributes.

--


More information about the Digitalmars-d-bugs mailing list