[Issue 8815] alias modification silently fails on nested fields

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 26 14:05:51 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=8815



--- Comment #2 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-01-26 14:05:49 PST ---
I can see why, it seems "c.x" gets converted to "this.x":

@property void init(alias symb)()
{
    pragma(msg, symb);  // "this.x", should be "s.x"
    symb = new int;
}

class C
{
    this()
    {
        init!(s.x);
    }

    struct S { int* x; }
    S s;
}

void main()
{
    auto c = new C;
}

Additionally I get this in this sample:

core.exception.InvalidMemoryOperationError

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list