Bug 10264 – Some missing implicit conversions in dynamic array of dynamic array literals

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2013-06-04T04:57:58Z
Last change time
2024-12-13T18:07:38Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
bearophile_hugs
Moved to GitHub: dmd#18599 →

Comments

Comment #0 by bearophile_hugs — 2013-06-04T04:57:58Z
void main() { double[] a = [1.0, 2, 3]; // OK double[][] m1 = [[1.0, 2.0], [3, 4]]; // error float[][] m2 = [[1.0, 2.0], [3.0, 4.0]]; // OK float[][] m3 = [[1.0f, 2.0f], [3.0, 4.0]]; // error } DMD 2.064alpha gives: temp.d(3): Error: incompatible types for (([1.00000, 2.00000]) : ([3, 4])): 'double[]' and 'int[]' temp.d(5): Error: incompatible types for (([1.00000F, 2.00000F]) : ([3.00000, 4.00000])): 'float[]' and 'double[]'
Comment #1 by robert.schadek — 2024-12-13T18:07:38Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18599 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB