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

[email protected] changed:

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

--- Comment #7 from [email protected] ---
While this is a regression, the underlying bug existed already in 2.089.1:

@safe:
struct S{
    @safe:
    int[8] a;
    ~this(){ a[] = 0; }
    ref val(){ return a; }
}
S bar(){ return S([2,2,2,2,2,2,2,2]); }
int[8] foo(){ return bar.val; }

void main(){ assert(foo() == [2,2,2,2,2,2,2,2]); } // error

I guess this is why review did not catch the problem (the pull request just
generalized an already existing wrong transformation).

--

Reply via email to