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

           Summary: Unexpected "duplicate union initialization for X"
                    error
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: verylonglogin....@gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin....@gmail.com> 2012-10-28 
10:12:15 MSK ---
Should assigning `.init` to a union be allowed or disallowed? At leas current
behavior is inconsistent:

---
union U { int a, b; }

enum U u0 = U.init;  // No errors
U u1;                // No errors
U u2 = U.init;  // Error: duplicate union initialization for b

void main()
{
    U u3 = U.init;            // No errors
    immutable U u4 = U.init;  // No errors
    immutable static U u5 = U.init;  // Error: duplicate union...
    static U u6 = u4;      // Error: duplicate union...
    static U u7 = U.init;  // Error: duplicate union...
}
---

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

Reply via email to