[Issue 16104] Unions should allow fields with destructors, postblits, and invariants

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon May 30 20:48:58 PDT 2016


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

--- Comment #2 from Walter Bright <bugzilla at digitalmars.com> ---
Consider:

  struct S { ~this(); }
  struct T { S s; }

The compiler will automatically create a destructor for T that will call the
destructor for s, or will add code to do that to the destructor for T.

  union U { S1 a; S2 b; }
  U u;

What happens to RIAA with this?

--


More information about the Digitalmars-d-bugs mailing list