[Issue 8902] Unexpected "duplicate union initialization for X" error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 28 02:12:26 PDT 2012


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



--- Comment #2 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2012-10-28 12:12:11 MSK ---
(In reply to comment #1)
> (In reply to comment #0)
> It would further more appear that the compiler has trouble detecting this in
> conditional implementations, which makes it difficult to bypass this problem.

Possible this is related to an error gagging problem. E.g. consider this:
---
union U { int a, b; }

template t(T)
{ static T t = T.init; } // Error: duplicate union initialization for b

static if (__traits(compiles, t!U)) { }
---

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


More information about the Digitalmars-d-bugs mailing list