[Issue 5937] Problem with map!delegate(iota(floating point))

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri May 6 15:22:21 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5937



--- Comment #1 from bearophile_hugs at eml.cc 2011-05-06 15:18:27 PDT ---
A better example for the second (bar) case, the problem seems in iota():


import std.range, std.algorithm;
void main() {
    auto range2a = iota(1, 5, 1);
    int delegate(int) bar1 = (int x){ return 1; };
    auto barr1 = map!bar1(range2a);
    foreach (x; barr1) {} // OK

    auto range2b = iota(1, 5, 1);
    double delegate(double) bar2 = (double x){ return 1.0; };
    auto barr2 = map!bar2(range2b);
    foreach (x; barr2) {} // OK
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list