D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3812 - Missing line number for implicit cast of variadic function to array
Summary: Missing line number for implicit cast of variadic function to array
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 critical
Assignee: yebblies
URL:
Keywords: diagnostic, pull
: 7434 (view as issue list)
Depends on:
Blocks:
 
Reported: 2010-02-18 07:16 UTC by Don
Modified: 2015-06-09 05:10 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Don 2010-02-18 07:16:12 UTC
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 2 yebblies 2012-02-03 23:25:41 UTC
*** Issue 7434 has been marked as a duplicate of this issue. ***
Comment 3 github-bugzilla 2012-02-21 22:17:30 UTC
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 github-bugzilla 2012-02-21 23:03:36 UTC
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