https://issues.dlang.org/show_bug.cgi?id=15996

Walter Bright <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #3 from Walter Bright <[email protected]> ---
The attachment:
---------------------------

safe:

import std.stdio;

struct T { int y; }

auto foo() {
    auto t = T(12345);
    auto x = &t.y;
    return x;
}

unittest {
    auto x = foo();
    writeln("Hello world");
    assert(*x == 12345);
}

--

Reply via email to