← Back to index
|
Original Bugzilla link
Bug 706 – incorrect type deduction for array literals in functions
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-12-21T09:23:00Z
Last change time
2014-02-15T13:21:04Z
Keywords
rejects-valid
Assigned to
bugzilla
Creator
thomas-dloop
Comments
Comment #0
by thomas-dloop — 2006-12-21T09:23:05Z
# # 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
Comment #1
by bugzilla — 2007-11-03T21:42:45Z
Fixed dmd 1.023 and 2.007