[Issue 734] New: Multidimensional arrays use incorrect initializer
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Dec 23 11:04:55 PST 2006
http://d.puremagic.com/issues/show_bug.cgi?id=734
Summary: Multidimensional arrays use incorrect initializer
Product: D
Version: 0.177
Platform: All
OS/Version: All
Status: NEW
Keywords: wrong-code
Severity: major
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: dvdfrdmn at users.sf.net
------------------
typedef int Xint = 42;
void test1()
{
Xint[3][] x = new Xint[3][4];
foreach(Xint[3] i; x) {
foreach (Xint j; i)
assert(j == 42);
}
}
void test2()
{
Xint[3][] x = new Xint[3][4];
x.length = 200;
assert(x.length == 200);
foreach(Xint[3] i; x) {
foreach (Xint j; i)
assert(j == 42);
}
}
void main()
{
test1();
test2();
}
-----------------
--
More information about the Digitalmars-d-bugs
mailing list