Bug 13811 – Cannot deduce function from argument types with varargs
Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-12-02T17:25:00Z
Last change time
2014-12-04T14:48:59Z
Assigned to
nobody
Creator
doob
Comments
Comment #0 by doob — 2014-12-02T17:25:42Z
This code worked in 2.066.0 but fails to compile in 2.066.1
void remove (T) (T[] arr, T[] elements ...) { }
void remove (Range, Index ...) (Range range, Index indexes) { }
void main ()
{
string[] a;
a.remove(3);
}
The error message is:
main.d(12): Error: template main.remove cannot deduce function from argument types !()(string[], int), candidates are:
main.d(6): main.remove(T)(T[] arr, T[] elements...)
main.d(7): main.remove(Range, Index...)(Range range, Index indexes)
Comment #1 by k.hara.pg — 2014-12-04T14:48:59Z
*** This issue has been marked as a duplicate of issue 13694 ***