[Issue 3911] New: Associative array in CTFE crashes compiler
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Mar 9 02:26:45 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3911
Summary: Associative array in CTFE crashes compiler
Product: D
Version: 2.041
Platform: x86
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2010-03-09 02:26:43 PST ---
This crashes the compiler:
auto bunch(T)(T[] items...) {
return ["+" : 0];
}
enum int* r = "+" in bunch(1);
void main() {}
The following variant of the same program doesn't crash the compiler, but gives
a forward reference error, that seems wrong:
Error: forward reference to bunch
auto bunch() {
return ["+" : 0];
}
enum int* r = "+" in bunch();
void main() {}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list