[Issue 1898] New: infinite loop when allocate an array of AA
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Mar 8 12:23:44 PST 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1898
Summary: infinite loop when allocate an array of AA
Product: D
Version: 2.012
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: someanon at yahoo.com
How to allocate an array of AA?
1)
I tried two ways (new, and setting array length), in both cases the code
compiles, but the executable seems run into infinite loop, and never finish.
2)
how to new an AA? what's the syntax?
http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=67463
http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D&artnum=67466
$ cat mapbug.d
void allocAA() {
int[int][] maps;
maps = new int[int][3];
maps.length = 3;
int[int]* mapsp;
//mapsp = new int[int]; // this line need size of rightmost array, not type
int
}
int main() {
allocAA();
return 0;
}
--
More information about the Digitalmars-d-bugs
mailing list