digitalmars.D.bugs - [Issue 734] New: Multidimensional arrays use incorrect initializer
- d-bugmail puremagic.com (40/40) Dec 23 2006 http://d.puremagic.com/issues/show_bug.cgi?id=734
- Thomas Kuehne (12/39) Dec 26 2006 -----BEGIN PGP SIGNED MESSAGE-----
- d-bugmail puremagic.com (9/9) Jan 03 2007 http://d.puremagic.com/issues/show_bug.cgi?id=734
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 digitalmars.com
ReportedBy: dvdfrdmn 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();
}
-----------------
--
Dec 23 2006
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 d-bugmail puremagic.com schrieb am 2006-12-23:http://d.puremagic.com/issues/show_bug.cgi?id=734------------------ 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(); } -----------------Added to DStress as http://dstress.kuehne.cn/run/a/array_initialization_30_A.d http://dstress.kuehne.cn/run/a/array_initialization_30_B.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFkP+cLK5blCcjpWoRAsYwAKCGJPvWAO4U0WG+PLNpUkhRP3Z8VQCfaH3k bPUunaB4/pmvllZcXnFv42g= =bpRX -----END PGP SIGNATURE-----
Dec 26 2006
http://d.puremagic.com/issues/show_bug.cgi?id=734
bugzilla digitalmars.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Fixed DMD 1.00
--
Jan 03 2007









Thomas Kuehne <thomas-dloop kuehne.cn> 