Module level variable shadowing

Kapps via Digitalmars-d digitalmars-d at puremagic.com
Fri Jun 27 11:09:23 PDT 2014


On Friday, 27 June 2014 at 08:24:16 UTC, dennis luehring wrote:
> Am 27.06.2014 10:20, schrieb dennis luehring:
>> I
>>>think we hit the sweet spot at restricting shadowing detection 
>>>to local scopes.
>
> sweet does not mean - use a better name or .x to avoid manualy 
> hard to detect problems - its like disabled shadow detection in 
> local scopes
>
> what i don't understand - why on earth should someone want to 
> shadow a(or better any) variable at all?

struct Foo {
      int a;
      this(int a) {
          this.a = a;
      }
}


More information about the Digitalmars-d mailing list