August 12, 2007 [Issue 1414] New: compiler crashes with CTFE and structs | ||||
---|---|---|---|---|
| ||||
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 -- |
September 29, 2007 [Issue 1414] compiler crashes with CTFE and structs | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | 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 -- |
Copyright © 1999-2021 by the D Language Foundation