[Issue 1432] Bogus "overlapping initialization" error with structs, unions, and member initializers

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Dec 16 12:52:09 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=1432



--- Comment #7 from Martin Nowak <code at dawg.eu> 2013-12-16 12:52:04 PST ---
I see, you're right.
Specifically one should be able to explicitly default initialize a field.
union { T1 t1; T2 t2 = T2.init; }

NB: A workaround to the aforementioned bug is to simply change the order of
union fields so that the one with explicit initializer comes first.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list