H. S. Teoh:

When you have nested with's.

Or when the object members shadow local variables in the parent scope.

        struct S {
                int x;
        }

        void main() {
                int x, y;
                S s;

                with(s) {
                        x = 1;
                        y = 2;
                }
        }

That code doesn't compile:

test.d(10): Error: with symbol test.S.x is shadowing local symbol
test.main.x

Bye,
bearophile

Reply via email to