digitalmars.D.bugs - [Issue 12925] New: Implicit cast of associative arrays in array
- via Digitalmars-d-bugs (23/23) Jun 15 2014 https://issues.dlang.org/show_bug.cgi?id=12925
https://issues.dlang.org/show_bug.cgi?id=12925 Issue ID: 12925 Summary: Implicit cast of associative arrays in array literal Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Keywords: rejects-valid Severity: enhancement Priority: P1 Component: DMD Assignee: nobody puremagic.com Reporter: bearophile_hugs eml.cc I don't know if this is a bug: void main() { double[int][] aa1 = [[1: 2.0], [3: 4]]; // OK auto aa2 = [[1: 2.0], [3: 4]]; // Error } DMD 2.066alpha gives: test.d(3,36): Error: incompatible types for (([1:2.00000]) : ([3:4])): 'double[int]' and 'int[int]' --
Jun 15 2014