← Back to index
|
Original Bugzilla link
Bug 10563 – Accessing const/immutable string array in CTFE crashes dmd.
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-07-06T22:13:00Z
Last change time
2013-11-20T22:33:58Z
Assigned to
nobody
Creator
iselix1988+dbugzilla
Comments
Comment #0
by iselix1988+dbugzilla — 2013-07-06T22:13:31Z
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
Comment #1
by yebblies — 2013-11-20T22:33:58Z
Seems to work now.