D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3828 - A failure in AA literals
Summary: A failure in AA literals
Status: RESOLVED DUPLICATE of issue 5448
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All Windows
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-18 12:42 UTC by bearophile_hugs
Modified: 2015-06-09 01:27 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2010-02-18 12:42:29 UTC
This works:
void main() {
    int[string][] a1 = [["cc":0]];
}

This doesn't work:
void main() {
    int[string][] a2 = [["cc":0], ["DD":10]];
}

Gives:
test.d(3): Error: Integer constant expression expected instead of "cc"
test.d(3): Error: Integer constant expression expected instead of "cc"
Error: incompatible types for (([0]) ? (["DD":10])): 'int[1u]' and 'int[string]'
test.d(3): Error: cannot implicitly convert expression ([(__error),(__error)]) of type int[2u] to int[string][]
Error: cannot cast int to int[string]
Error: cannot cast int to int[string]
Comment 1 yebblies 2012-02-02 22:55:29 UTC
Folded into issue 5448.

*** This issue has been marked as a duplicate of issue 5448 ***