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

John Colvin <john.loughran.col...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |john.loughran.colvin@gmail.
                   |                            |com

--- Comment #2 from John Colvin <john.loughran.col...@gmail.com> ---
Simplified example:

struct S {
        union {
                // works if order swapped
                int b;
                int[1] a;
        }

        this(int v) {
                a[0] = v;
        }
}                                            
auto s = S(2);

void main() {
        assert(s.a[0] == 2); // fails
        assert(S(2).a[0] == 2); // OK
}

--

Reply via email to