Bug 3812 – Missing line number for implicit cast of variadic function to array

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2010-02-18T07:16:00Z
Last change time
2015-06-09T05:10:44Z
Keywords
diagnostic, pull
Assigned to
yebblies
Creator
clugdbug

Comments

Comment #0 by clugdbug — 2010-02-18T07:16:12Z
T[] toArray(T)(T[] values...) { return values.dup; } int[] array = toArray(1.0,2.0,3.0); ---- Error: cannot implicitly convert expression ([1,2,3]) of type double[] to int[] Only applies in 2.038 and later. Behaviour in D2.037 was different; old behaviour still happens in D1.
Comment #1 by yebblies — 2012-02-01T08:06:51Z
Comment #2 by yebblies — 2012-02-03T23:25:41Z
*** Issue 7434 has been marked as a duplicate of this issue. ***
Comment #3 by github-bugzilla — 2012-02-21T22:17:30Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/67ba76638878f0752f9875d22c23bf4e034d2b89 Merge pull request #680 from yebblies/issue3812 Issue 3812 - Missing line number for implicit cast of variadic function to array
Comment #4 by github-bugzilla — 2012-02-21T23:03:36Z
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/24dd30b16be51534076f79f2e2ba7b786b7a1b10 fix Issue 3812 - Missing line number for implicit cast of variadic function to array