6612 – Associative arrays with associative array keys literals

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6612 - Associative arrays with associative array keys literals
Summary: Associative arrays with associative array keys literals
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: pull, rejects-valid
Depends on:
Blocks:
Reported: 2011年09月06日 03:21 UTC by bearophile_hugs
Modified: 2012年06月11日 10:51 UTC (History)
1 user (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2011年09月06日 03:21:48 UTC
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 Kenji Hara 2012年06月07日 05:59:06 UTC
https://github.com/D-Programming-Language/dmd/pull/992 
Comment 2 github-bugzilla 2012年06月11日 09:43:36 UTC
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


AltStyle によって変換されたページ (->オリジナル) /