Bug 12925 – Implicit cast of associative arrays in array literal

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2014-06-15T07:07:08Z
Last change time
2024-12-13T18:21:38Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
bearophile_hugs
Moved to GitHub: dmd#17666 →

Comments

Comment #0 by bearophile_hugs — 2014-06-15T07:07:08Z
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 by robert.schadek — 2024-12-13T18:21:38Z
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