[Issue 12925] New: Implicit cast of associative arrays in array literal
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Jun 15 00:07:08 PDT 2014
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 at puremagic.com
Reporter: bearophile_hugs at 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]'
--
More information about the Digitalmars-d-bugs
mailing list