Bug 1406 – Odd error when using indexes in static array initializers
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2007-08-08T10:02:00Z
Last change time
2014-02-16T15:26:19Z
Keywords
rejects-valid
Assigned to
nobody
Creator
samukha
Comments
Comment #0 by samukha — 2007-08-08T10:02:38Z
Probably, related to 1253
void main()
{
const char[][3] a = [1:"one", 2:"two"];
const s = a[1]; // Error: array initializers as expressions are not allowed
}
Comment #1 by samukha — 2009-10-21T00:59:24Z
Works with dmd 1.049. a is correctly initialized to [null, "one", "two"]