Bug 6612 – Associative arrays with associative array keys literals
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-09-06T03:21:00Z
Last change time
2012-06-11T10:51:02Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2011-09-06T03:21:48Z
void main() {
auto aa1 = [1: 2]; // OK
auto aa2 = [4: 5]; // OK
int[int[int]] aa3 = [a1a:3, a1b:6]; // OK
int[int[int]] aa4 = [[1:2]:3, [4:5]:6]; // error
}
DMD 2.055beta shows:
test.d(5): comma expected separating array initializers, not :
test.d(5): semicolon expected, not '3'
test.d(5): found ':' when expecting ';' following statement
test.d(5): found ']' when expecting ';' following statement