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



--- Comment #1 from Andrej Mitrovic <[email protected]> 2013-08-29 
07:01:00 PDT ---
Note however that it only fails when declaring, not when assigning. The
following works properly:

-----
import std.conv;
import std.typecons;

class Point
{
    this(int x, int y)
    {
        this.x = x;
        this.y = y;
    }

    int x;
    int y;
}

void main()
{
    auto p1 = scoped!Point(1, 2);
    assert(p1.x == 1, p1.x.text);  // ok
    assert(p1.y == 2, p1.y.text);  // ok

    Point p2 = p1;
    assert(p2.x == 1, p2.x.text);  // ok
    assert(p2.y == 2, p2.y.text);  // ok
}
-----

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

Reply via email to