digitalmars.D.bugs - [Issue 1414] New: compiler crashes with CTFE and structs
- d-bugmail puremagic.com (45/45) Aug 12 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1414
- d-bugmail puremagic.com (9/9) Sep 28 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1414
http://d.puremagic.com/issues/show_bug.cgi?id=1414 Summary: compiler crashes with CTFE and structs Product: D Version: 1.019 Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: thecybershadow gmail.com ---------test case 1--------- struct MyStruct { string name; } const MyStruct item = {"item"}; string mixItemList() { return item.name; } const string s = mixItemList(); -------end test case 1------- ---------test case 2--------- struct MyStruct { string name; } const MyStruct[] items = [ {"item"}, ]; string mixItemList() { string s; foreach(item;items) s ~= item.name; return s; } const string s = mixItemList(); -------end test case 2------- Both cases crash, case 2 also outputs a strange error message: testcase2.d(7): Error: array initializers as expressions are not allowed --
Aug 12 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1414 bugzilla digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #1 from bugzilla digitalmars.com 2007-09-28 22:10 ------- Fixed dmd 1.021 and 2.004 --
Sep 28 2007