D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 12925 - Implicit cast of associative arrays in array literal
Summary: Implicit cast of associative arrays in array literal
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P4 enhancement
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2014-06-15 07:07 UTC by bearophile_hugs
Modified: 2024-12-13 18:21 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2014-06-15 07:07:08 UTC
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]'
Comment 1 dlangBugzillaToGithub 2024-12-13 18:21:38 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/17666

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB