D-Programming-Language/dmd — pull request #1369 by 9rnsr (2012-12-13 08:05:41+00:00)
Title: Issue 8902 - Unexpected "duplicate union initialization for X" error

http://d.puremagic.com/issues/show_bug.cgi?id=8902

Note that one CTFE limitation will be added by this:

* CTFE can only work for the first field of overlapped ones.

Example of breaking.
```d
struct S {
union {
int x;
int y;
}
}
bool test() {
S s = S.init;
int x = s.x; // OK -> OK
int y = s.y; // OK -> NG
return true;
}
enum x = test();
```

This change will break `std.format.FormatSpec` struct, and it needs an additional Phobos fix.
@donc, may you have better idea for that?