← Back to index
|
Original Bugzilla link
Bug 5972 – CTFE: Can't assign to elements of arrays of slices
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2011-05-09T21:16:00Z
Last change time
2015-06-09T05:10:38Z
Assigned to
nobody
Creator
clugdbug
Comments
Comment #0
by clugdbug — 2011-05-09T21:16:26Z
int foo() { char [] z = "abc".dup; char[] [] a = [null, null]; a[0] = z[0..2]; a[0][2] = 'q'; return 56; } static assert(foo()==56); This doesn't compile, previously it compiled but generated wrong code.
Comment #1
by bugzilla — 2011-05-10T16:00:18Z
https://github.com/D-Programming-Language/dmd/commit/c4604f136689660c8926b8eb06de0d1d104b7641
https://github.com/D-Programming-Language/dmd/commit/bcd6f309a4b6492dadc7fe46c43691b09b510a87