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
Comment #1 by k.hara.pg — 2012-06-07T05:59:06Z
Comment #2 by github-bugzilla — 2012-06-11T09:43:36Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c0eadf4f979b7d2216d6b77797575759fc9f25a8 fix Issue 6612 - Associative arrays with associative array keys literals https://github.com/D-Programming-Language/dmd/commit/52d3314a396c5042ca4dd6f110dbf749a7ce5459 Merge pull request #992 from 9rnsr/fix6612 Issue 6612 - Associative arrays with associative array keys literals