[Issue 8017] Shadowing declaration not detected in opApply

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 3 20:54:24 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8017


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Shadowing declaration not   |Shadowing declaration not
                   |detected when iterating     |detected in opApply
                   |hashes                      |


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2012-10-03 20:48:35 PDT ---
Changing title as this seems related to opApply. This passes:

struct Foo
{
    int opApply(int delegate(int, int) dg) { return 1; }
}

void main()
{
    int foo;
    foreach (a, b; Foo())
    {
        string foo = "";
    }
}

foreach on a hash probably expands to some opApply code and we end up with the
same thing as this sample (just a guess though).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list