Thread overview
[Issue 16548] Shadowing a variable not detected when nesting foreach with associative arrays
Sep 22, 2017
Vladimir Panteleev
4 days ago
Rainer Schuetze
4 days ago
Rainer Schuetze
September 22, 2017
https://issues.dlang.org/show_bug.cgi?id=16548

Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid, diagnostic
           Hardware|x86_64                      |All
                 OS|Windows                     |All

--- Comment #1 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
Second variable doesn't need to be a foreach variable, either:

/////// test.d ///////
void main()
{
    int x;
    int[int] aa;
    foreach (k, v; aa)
    {
        int x;
    }
}
//////////////////////

--
4 days ago
https://issues.dlang.org/show_bug.cgi?id=16548

Rainer Schuetze <r.sagitario@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sumit.adhikari@gmail.com

--- Comment #2 from Rainer Schuetze <r.sagitario@gmx.de> ---
*** Issue 11923 has been marked as a duplicate of this issue. ***

--
4 days ago
https://issues.dlang.org/show_bug.cgi?id=16548

Rainer Schuetze <r.sagitario@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |r.sagitario@gmx.de
         Resolution|---                         |FIXED

--- Comment #3 from Rainer Schuetze <r.sagitario@gmx.de> ---
Works in dmd 2.089, with a slight diagnostic inaccuracy: issue 20369

--