Bug 11421 – Dynamic array of associative array literal type inference

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-11-02T11:45:00Z
Last change time
2014-06-15T03:01:40Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2013-11-02T11:45:35Z
void main() { const a1 = [[1: 2]]; // line 3, error const int[int][] a2 = [[1: 2]]; // OK. } dmd 2.064beta4 gives: test.d(3): Error: variable a1 cannot infer type from initializer
Comment #1 by k.hara.pg — 2014-06-11T10:38:00Z
Comment #2 by github-bugzilla — 2014-06-15T03:01:40Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/842543d25373016adddc7ddd5bbd96b23d609c6a fix Issue 11421 - Dynamic array of associative array literal type inference Initializer::inferType should be processed recursively https://github.com/D-Programming-Language/dmd/commit/d4ea0c085f1a7e926d8ff5224476a7631f3a03c8 Merge pull request #3658 from 9rnsr/fix11421 Issue 11421 - Dynamic array of associative array literal type inference