Moving back to .NET
default0 via Digitalmars-d
digitalmars-d at puremagic.com
Mon Sep 21 06:03:19 PDT 2015
On Monday, 21 September 2015 at 00:01:01 UTC, Temtaime wrote:
> I also hate errors when a lambda contains some errors.
>
> [ 1 ].countUntil!(a => a == undeclared_something);
>
> Error: template std.algorithm.searching.countUntil cannot
> deduce function from argument types !((a) => a ==
> undefined)(int[])
I agree, the error should contain better reasoning as to why the
function cannot be deduced. Since Phobos uses templates pretty
heavily, and sometimes has a decent set of pre-conditions,
tracking down which condition exactly is failing is hard.
Printing the template condition and the expression in it that
caused the instantiation to fail would be tremendously helpful!
More information about the Digitalmars-d
mailing list