http://d.puremagic.com/issues/show_bug.cgi?id=10563
Summary: Accessing const/immutable string array in CTFE crashes
dmd.
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from [email protected] 2013-07-06 22:13:31 PDT ---
Accessing const/immutable string array in struct/class in CTFE, cause dmd
crashes by segmentation fault.
See code below.
----
immutable string[] array = ["0"];
class cls{
immutable string[] array = ["0"];
}
struct str{
immutable string[] array = ["0"];
}
auto top(T)(T t){
return t[0];
}
pragma(msg, array.top); // OK
pragma(msg, cls.array.top); // SEGV
pragma(msg, str.array.top); // SEGV
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------