[Issue 8017] Shadowing declaration not detected in opApply

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Aug 27 15:39:43 PDT 2016


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

Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #2 from Andrej Mitrovic <andrej.mitrovich at gmail.com> ---
Hm well this is sort of by design, for example there are no errors here:

-----
int[int] table;

void main()
{
    int foo;

    void test ( )
    {
        string foo = "";
    }
}
-----

A foreach is really an implicitly generated function just like 'test'.

--


More information about the Digitalmars-d-bugs mailing list