[Issue 706] New: incorrect type deduction for array literals in functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Dec 21 07:23:05 PST 2006
http://d.puremagic.com/issues/show_bug.cgi?id=706
Summary: incorrect type deduction for array literals in functions
Product: D
Version: 0.177
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: thomas-dloop at kuehne.cn
#
# auto x = [[1.0, 2.0], [3.0, 4.0]]; // works
#
# void foo(){
# auto x = [[1.0, 2.0], [3.0, 4.0]]; // fails
# }
#
Error: cannot implicitly convert expression ([[1,2],[3,4]]) of type
double[2][2] to double
test cases:
http://dstress.kuehne.cn/run/a/array_initialization_27_D.d
http://dstress.kuehne.cn/run/a/array_initialization_27_E.d
--
More information about the Digitalmars-d-bugs
mailing list