Bug or feature?

mimi 4.deniz.z.z at gmail.com
Sun May 26 16:35:41 PDT 2013


import std.stdio;

struct S
{
     int bigUglyName;

     void foo( S s )
     {
         alias bigUglyName local;
         alias s.bigUglyName b;

         writeln( "bigUglyName (AKA local)=", local, " b=", b );
     }
}

void main()
{
     S s1;
     S s2;

     s1.bigUglyName = 1;
     s2.bigUglyName = 2;

     s1.foo( s2 );
}


returns to console:
bigUglyName (AKA local)=1 b=1

Why? I am expected that b=2


More information about the Digitalmars-d-learn mailing list