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

ag0ae...@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ag0ae...@gmail.com

--- Comment #3 from ag0ae...@gmail.com ---
Very similar case:

----
struct S {}

S f(ref int i)
{
    ++i;
    return S();
}

void main()
{
    int i = 2;
    assert(f(i) == S());
    assert(i == 3); // fails, i = 2
}
----

With the enum, the struct doesn't have to be empty, but here it does.

--

Reply via email to