https://issues.dlang.org/show_bug.cgi?id=19917
--- Comment #8 from Manu <[email protected]> --- (In reply to Andrei Alexandrescu from comment #7) > That's excessive. Pasting from > https://issues.dlang.org/show_bug.cgi?id=19919: > > I think the principle of maximum simplicity goes like this: > > * Only the first field can have an initializer (if you want another field... > move it to the top). > * If that initializer is "= void", the union is void-initialized. > > All else is in error. That's that. Doesn't prevent any work getting done and > is simple to spec and implement. I don't think it's simple, it's a weird magic rule that you wouldn't/couldn't expect, and you can't know unless you already know. Anyway, if it is the case, then the compiler needs to emit an error if an initialisation is applied to any non-first member explaining that rule. --
