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

           Summary: Static array .init is actually .init of the array
                    element type, not the array.
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: david.ecka...@sociomantic.com


--- Comment #0 from David Eckardt <david.ecka...@sociomantic.com> 2012-03-22 
08:34:02 PDT ---
Let T be a type and n a size_t constant, then T[n].init is the same as T.init.

This causes the program code

---
    {
        int[5] x;

        if (x == x.init) { /* ... */ }
    }
---

to be rejected with the compiler error message "Error: incompatible types for
((x) == (0)): 'int[5u]' and 'int'", whereas

---
    static assert(x.init == x[0].init);
---

passes successfully.

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

Reply via email to