More bugs...
Mehrdad
wfunction at hotmail.com
Mon Apr 30 18:46:15 PDT 2012
Is it just "weak", or is it outright wrong?
It's telling me "R" isn't a valid identifier...
"Timon Gehr" wrote in message news:jnnefl$2j69$1 at digitalmars.com...
On 05/01/2012 03:09 AM, Mehrdad wrote:
> Also, what exactly is wrong with this code?
>
> private import std.range;
> void filter(R)(R, bool delegate(ElementType!R)) { }
> void main() { [1, 2, 3].filter(delegate bool(x) { return x < 3; }); }
>
The current type deduction strategy for IFTI is (imho) too weak.
private import std.range;
void filter(R)(R, bool delegate(ElementType!R)) { }
void main() { [1, 2, 3].filter!(int[])(delegate bool(x) { return x < 3;
}); }
More information about the Digitalmars-d
mailing list