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



--- Comment #1 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2011-08-04 
13:36:01 PDT ---
Oh damnit duplicated code sorry:

import std.typecons;

struct Foo
{
    struct Payload
    {
        this(ref int bar, int value)
        { 
            bar = value;
            assert(bar == 5);   // ok
        }
    }

    alias RefCounted!(Payload, RefCountedAutoInitialize.yes) Data;
    Data data;

    int bar;

    this(int value) 
    {
        data = Data(bar, value);
        assert(bar == 5);  // throws, it's still 0
    }    
}

void main()
{
    auto foo = Foo(5);
}

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

Reply via email to