Bug 2009 – Compile-time multi-dimentional array not initialized

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2008-04-18T17:14:00Z
Last change time
2015-06-09T01:14:35Z
Assigned to
bugzilla
Creator
bartosz

Comments

Comment #0 by bartosz — 2008-04-18T17:14:46Z
The following code works at runtime: string [][] f () { string [][] result; result ~= ["int i;"]; return result; } but when used in a mixin, it doesn't compile mixin (f()[0][0]); One little change, adding the initialization of the array, makes it work again: string [][] result = []; // works CT
Comment #1 by clugdbug — 2008-04-28T07:25:17Z
I think this is the same as issue#1768.
Comment #2 by gide — 2008-04-28T10:02:30Z
*** This bug has been marked as a duplicate of 1768 ***
Comment #3 by smjg — 2008-11-21T15:24:35Z
Cannot reproduce under DMD 1.036 or 2.019. When reporting compiler errors, please actually give the errors, rather than just stating that it "doesn't compile". And please don't reopen issues without giving your reason for doing so. *** This bug has been marked as a duplicate of 1768 ***