[Issue 4603] array(iota(1, 0)) error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Aug 19 17:44:27 PDT 2010


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



--- Comment #5 from bearophile_hugs at eml.cc 2010-08-19 17:44:23 PDT ---
Throwing? No, look at Python:

>>> range(1, 0)
[]

It needs to return an empty range.

This:
foreach (i; iota(1, 0))
is the same as:
foreach (i; 1 .. 0)
Or:
for (int i = 1; i < 0; i++)

It's like an empty loop.

-- 
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