[Issue 7493] New: Initialization of void[][N]

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Feb 13 06:26:18 PST 2012


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

           Summary: Initialization of void[][N]
           Product: D
           Version: D1
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: wrong-code
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: thecybershadow at gmail.com


--- Comment #0 from Vladimir Panteleev <thecybershadow at gmail.com> 2012-02-13 06:26:16 PST ---
void main()
{
    string str = "Hi";
    void[][1] arr = [str];
    assert(arr[0].length == str.length);
}

Notably, changing the second line to
    void[][1] arr = str;
will make the assert pass, so I guess DMD is now trying some new way of array
assignment which succeeds due to the implicit void[] conversion.

Worked in 1.070, doesn't work in 1.071 or the latest D1 beta.

-- 
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