September 29, 2014 [Issue 13556] New: inconsistent 'new' syntax for arrays | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=13556 Issue ID: 13556 Summary: inconsistent 'new' syntax for arrays Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: DMD Assignee: nobody@puremagic.com Reporter: ketmar@ketmar.no-ip.org this is accepted by DMD: int[] a0 = new int[256]; and this is not: int[][] a1 = new int[256][256]; what i'm expecting is that second sample will be the same as: int[][] a1 = new int[][](256, 256); currently DMD complains that it "cannot implicitly convert expression (new int[256][](256u)) of type int[256][] to int[][]". -- |
Copyright © 1999-2021 by the D Language Foundation