www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13521] New: [D1] -di disables declaration shadowing message

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

          Issue ID: 13521
           Summary: [D1] -di disables declaration shadowing message
           Product: D
           Version: D1
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: public dicebot.lv

Shadowing declarations is deprecated, and removed in D2.

In D1, a deprecation error is issued by default, but when using -di to only
print deprecations as warnings, the message is not emitted.

void f()
{
    int i;
    { int i; }
}

$ dmd1 -c shadow.d
shadow.d(4): Deprecation: shadowing declaration shadow.f.i is deprecated
$ dmd1 -c -di shadow.d

--
Sep 23 2014