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