[Issue 13304] std.algorithm.reduce: "Unable to deduce an acceptable seed type" with float[]

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Aug 16 05:53:07 PDT 2014


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

--- Comment #4 from Vladimir Panteleev <thecybershadow at gmail.com> ---
(In reply to monarchdodra from comment #3)
> Error: template instance Test2!(__lambda2) cannot use local '__lambda2' as
> parameter to non-global template Test2(alias pred)
> Error: template instance main.main.foo!((a, b) => a + b) error instantiating

Try adding "static" to Test1 or Test2. Probably related to issue 11946.

> It doesn't quite explain the issue, but it still seems strange to me. my
> lambda doesn't require context, so it shouldn't considered "local", should
> it? Also, I don't understand the issue about "Global" template.

Yes, doesn't seem right. File it and maybe Kenji will look at it.

--


More information about the Digitalmars-d-bugs mailing list