Re: TDPL: Function literals with missing argument type specifiers do not compile

2010-08-21 Thread Andrej Mitrovic
Update: This seems to have been fixed in 2.048. But I don't see it mentioned in the changelog, so I'm not sure if it was fixed for good or fixed by accident. :) Andrej Mitrovic Wrote: The following example should compile according to TDPL. The compiler is supossed to automatically infer the

TDPL: Function literals with missing argument type specifiers do not compile

2010-08-02 Thread Andrej Mitrovic
The following example should compile according to TDPL. The compiler is supossed to automatically infer the type of the parameter in the function literal: void main() { } T[] find(alias pred, T)(T[] input) if (is(typeof(pred(input[0])) == bool)) { for (; input.length 0; input =

Re: TDPL: Function literals with missing argument type specifiers do not compile

2010-08-02 Thread Andrej Mitrovic
One other thing which is semi-relevant, from TDPL: auto f = (int i) {}; assert(is(f == function)); f seems to be a delegate by default, not a function. Andrej Mitrovic Wrote: The following example should compile according to TDPL. The compiler is supossed to automatically infer the type of