D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1406 - Odd error when using indexes in static array initializers
Summary: Odd error when using indexes in static array initializers
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Windows
: P2 major
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2007-08-08 10:02 UTC by Max Samukha
Modified: 2014-02-16 15:26 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Max Samukha 2007-08-08 10:02:38 UTC
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 Max Samukha 2009-10-21 00:59:24 UTC
Works with dmd 1.049. a is correctly initialized to [null, "one", "two"]