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

           Summary: Assertion `sz <= vsz' failed with struct literal
                    initializing zero length array
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: ibuc...@ubuntu.com


--- Comment #0 from Iain Buclaw <ibuc...@ubuntu.com> 2010-10-20 16:14:46 PDT ---
Test cases:

struct A { int[0] b; }
A a = A(0); // Fails, compiler aborts
A b = {b:0}; // OK, but perhaps shouldn't be.
A c = A([]); // OK
A d = {b:[]}; // OK



Although the compiler shouldn't issue an assert, a zero length array
should be enforced to have a 0 length initializer.

Regards

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

Reply via email to