[Issue 10264] New: Some missing implicit conversions in dynamic array of dynamic array literals
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 4 04:57:59 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10264
Summary: Some missing implicit conversions in dynamic array of
dynamic array literals
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2013-06-04 04:57:58 PDT ---
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[]'
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list