[Issue 2712] New: error with passing an array slot as another array length to new
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Mar 6 13:59:20 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2712
Summary: error with passing an array slot as another array length
to new
Product: D
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: andrei at metalanguage.com
void foo(uint n, in uint[] x)
{
auto y = new uint[x[n]];
}
void main()
{
foo(new uint[10]);
}
Error: need size of rightmost array, not type x[n]
--
More information about the Digitalmars-d-bugs
mailing list