http://d.puremagic.com/issues/show_bug.cgi?id=6681
yebblies <yebbl...@gmail.com> 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 <yebbl...@gmail.com> 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) StructLiteralExp::semantic('S(0LU,1,0)') S 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: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------