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

--- Comment #2 from Sobirari Muhomori <[email protected]> ---
void f(int n, T)(T val)if(n==0){}
void f1(int n)(int val)if(n==0){}
void g()
{
    f!1(1);
    f1!1(1);
}

The second instatiation gives good error message: "Error: template instance
f1!1 does not match template declaration f1(int n)(int val) if (n == 0)".

The first instatiation gives less helpful error message: "Error: template f
cannot deduce function from argument types !(1)(int), candidates are:...", but
it doesn't look like there's problem with deduction, should report no match.

See https://forum.dlang.org/post/[email protected]

--

Reply via email to