yebblies <> changed:

           What    |Removed                     |Added
           Platform|Other                       |All
            Summary|bogus duplicate union       |struct constructor call is
                   |initialization or           |converted to struct literal
                   |overlapping initialization  |that breaks union
                   |errors                      |initialization
         OS/Version|Mac OS X                    |All

--- Comment #3 from yebblies <> 2012-02-01 23:10:11 EST ---
Got my test cases a little mixed up there, but it's still mostly valid.

All of the non-struct-literal struct construction seems to be converted into
struct literals.  eg.

struct S
    this(int a, int b) { this.a = b; this.b = a; }
    union {
        ulong g;
        struct {int a, b; };

static immutable S s = S(0, 1);

Prints: (with a little extra debug output)

Error: duplicate union initialization for a
Error: duplicate union initialization for b

As you can see, it make a struct literal with every field accounted for.

So this is a bug in the constfolding/ctfe code.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to