On 13 okt 2013, at 00:12, Walter Bright <[email protected]> wrote:

> http://ftp.digitalmars.com/dmd2beta.zip


Tango fails to compile with this. Reduced test case:

inout(T[]) fromString8(T) (inout(char[]) s, T[] dst) // line 13
{
    return s;
}

void main ()
{
    char[] a;
    fromString8(a, a); // line 21
}

Error message:

main.d(21): Error: template main.fromString8 does not match any function 
template declaration. Candidates are:
main.d(13):        main.fromString8(T)(inout(char[]) s, T[] dst)
main.d(21): Error: template main.fromString8(T)(inout(char[]) s, T[] dst) 
cannot deduce template function from argument types !()(char[], char[])

It seems the compiler cannot infer the type of T. The following will compile:

fromString8!(char)(a, a)

And if "inout" is removed it will compile as  well.

-- 
/Jacob Carlborg

_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta

Reply via email to