[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 02:24:51 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13304
monarchdodra at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |monarchdodra at gmail.com
--- Comment #1 from monarchdodra at gmail.com ---
(In reply to Vladimir Panteleev from comment #0)
> /////////////////// test.d ///////////////////
> import std.algorithm;
>
> void main()
> {
> float[] nums;
> float sum = reduce!((a,b) => a + b)(nums);
> }
> //////////////////////////////////////////////
>
> Introduced in https://github.com/D-Programming-Language/phobos/pull/2060
Seems its a glitch in the way the assertion code is written. The good news is
there is no logical fallacy in the algorithm.
I'll give it a quick fix.
--
More information about the Digitalmars-d-bugs
mailing list