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

           Summary: assertion failure in std.range.iota
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: Phobos
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Andrej Mitrovic <[email protected]> 2011-08-19 
07:49:29 PDT ---
import std.range;
import std.stdio;

void main()
{
   auto r1 = iota(0.0, 4.0, 0.03);  // ok
   auto r2 = iota(0.0, 3.0, 0.03);  //
[email protected](4001): Assertion failure
}

I want a range in steps of 0.03, beginning at 0.0 and ending at the
closest point to 3.0.

Line 4001 is:
assert(start + count * step >= end);

There's no documentation, and no custom assert message, so I don't know what
was the intention of the author.

It doesn't help that this fails in debug mode but works fine in release mode.

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

Reply via email to