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

Reply via email to