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


Yao Gomez <yao.go...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yao.go...@gmail.com


--- Comment #1 from Yao Gomez <yao.go...@gmail.com> 2012-02-06 12:48:21 PST ---
With DMD 2.058HEAD the assertion is now at line 4136.

Doing a little bit of debugging, it seems that the line at 4135:
---
if (pastEnd < end) ++count;
---
is the culprit. With the r1 range, the count variable is correctly updated, as
both pastEnd and end are different.

But with the failling range (r2), pastEnd and end have the same value!, and
thus the count is not correctly updated.

Changing the previous code to:
---
if (pastEnd <= end) ++count;
---
seems to do the trick, and passes all the std.range unit tests. But I don't
know if that's the correct fix.

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

Reply via email to