www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11593] New: Array type init syntax

https://d.puremagic.com/issues/show_bug.cgi?id=11593

           Summary: Array type init syntax
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc


--- Comment #0 from bearophile_hugs eml.cc 2013-11-24 06:07:03 PST ---
I think all the following forms should be accepted:

void main() {
    auto i1  = int.init;        // OK
    auto s1  = string.init;     // OK
    auto a1  = int[].init;      // Error
    auto a2  = (int[]).init;    // OK
    auto aa1 = int[int].init;   // Error
    auto aa2 = (int[int]).init; // OK
}


See also Issue 6408

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