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


bearophile_h...@eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_h...@eml.cc


--- Comment #2 from bearophile_h...@eml.cc 2010-12-01 12:39:36 PST ---
(In reply to comment #1)
> Symbols used in with should shadow symbols from other
> with statements.

Do you mean "shouldn't"?

This shadowing is not detected, and I think the compiler has to flag this is as
a compile error (just like it does with normal variables in the function stack
frame):

struct X { int a; }
struct Y { int a; }
void main() {
    X x;
    Y y;
    with (x) {
        a = 2;
        with (y) {
            a = 1;
        }
    }
    assert(x.a == 2);
}

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

Reply via email to