[Issue 411] New: array alloc with size from another array

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Oct 8 17:18:14 PDT 2006


           Summary: array alloc with size from another array
           Product: D
           Version: 0.169
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: benoit at tionex.de

void main(){
    int[]  ia;
    ia ~= 3;
    byte[] data = new byte[ia[0]]; // line 5
    byte[] data2 = new byte[ cast(int)(ia[s])]; // this compiles

a.d(5): need size of rightmost array, not type ia[0]


More information about the Digitalmars-d-bugs mailing list