https://issues.dlang.org/show_bug.cgi?id=15720
Issue ID: 15720
Summary: iota(long.max, long.min, step) does not work properly
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
Code:
------
import std.range;
import std.stdio;
void main() {
writeln(iota(long.max, long.min, -1).length);
writeln(iota(long.max, long.min, -2).length);
writeln(iota(long.max, long.min, -3).length);
}
------
Output:
------
18446744073709551615
0
1
------
Expected output:
------
18446744073709551615
9223372036854775807
6148914691236517205
------
--