[Issue 13127] New: Cannot deduce function with int[][] argument and "in" parameter

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Jul 13 12:53:10 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13127

          Issue ID: 13127
           Summary: Cannot deduce function with int[][] argument and "in"
                    parameter
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: doob at me.com

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.

--


More information about the Digitalmars-d-bugs mailing list