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

--- Comment #3 from Kenji Hara <[email protected]> ---
Minimized example code that compiler shows the error message.

struct X
{
    this(this) {}
    // or: ~this() {}
    // or: invariant {}
}

union U // Error
{
    X x;
    int overlapping;
}

struct S // Error
{
    union
    {
        X x;
        int overlapping;
    }
}

For U or S, compiler cannot generate destructors, postblits, or invariants
automatically, because the field x typed X overlapping with other fields.

--

Reply via email to