Bug 13127 – Cannot deduce function with int[][] argument and "in" parameter
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-07-13T19:53:00Z
Last change time
2014-08-22T08:04:33Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
doob
Comments
Comment #0 by doob — 2014-07-13T19:53:10Z
This code works in DMD 2.065.0 but not in 2.066.0-b3:
void foo (T)(in T[] src, T[] dest);
void main ()
{
int[][] a;
foo(a, a);
}
The error message is:
main.d(14): Error: template main.foo cannot deduce function from argument types !()(int[][], int[][]), candidates are:
main.d(9): main.foo(T)(in T[] src, T[] dest)
If I remove "in" or if "a" is of type "int[]" it compiles.