[Issue 12174] Problems caused by enum predicate with std.algorithm.sum

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Apr 9 03:13:12 PDT 2014


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

--- Comment #6 from Kenji Hara <k.hara.pg at gmail.com> ---
(In reply to monarchdodra from comment #5)
> This now seems to work for me on win32 for the code in HEAD. Resolved fixed?

My pull is for the ICE issue in comment #1. In git-head, std.algorithm.sum is
defined, so the issue is hidden. With following invalid code, you could
reproduce it.

import std.stdio, std.algorithm, std.range, std.conv;
void main()
{
    enum foo3 = (int n) => n.text.map!(d => d - '0').sumX;
    enum bar3 = iota(1, int.max).filter!(n => n % foo3(n) == 0);
    bar3.take(20).writeln;
}

--


More information about the Digitalmars-d-bugs mailing list