Shadowing of members

bearophile bearophileHUGS at lycos.com
Wed Jan 9 18:56:10 PST 2013


comco:

> I won't like this code:
> class Pu {
>    int a, b;
>    this(int a, int b) {
>        this.a = a;
>        this.b = b;
>    }
> }
>
> to issue warnings for a and b.

That's a nice warning to have, because that's bug-prone code, 
worth avoiding.

Bye,
bearophile


More information about the Digitalmars-d mailing list