[Issue 17584] New: Wrong error message for deprecated overrides

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Jul 2 11:39:26 PDT 2017


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

          Issue ID: 17584
           Summary: Wrong error message for deprecated overrides
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: timon.gehr at gmx.ch

The code:

class C{
    void foo(){}
}

class D: C{
    deprecated override void foo(){}          
}

Yields:

Deprecation: function tt.D.foo deprecated functions cannot be annotated
@disable

That is not what is happening. The error message should instead be:

Deprecation: overridden functions cannot be deprecated

--


More information about the Digitalmars-d-bugs mailing list