Bug 5873 – Cannot call iota() on long with step

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-04-23T08:15:00Z
Last change time
2011-06-22T08:43:16Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
kennytm

Comments

Comment #0 by kennytm — 2011-04-23T08:15:22Z
(This is a problem on Phobos git master introduced since commit 3e6679b2. The code works fine on 2.052) Test case: ------------------------ import std.range; void main() { iota(1L, 10L); // OK iota(1L, 10L, 3); // Error } ------------------------ Currently it shows the error /usr/include/phobos/std/range.d(3902): Error: cannot implicitly convert expression (unsigned((this.pastLast - this.current) / cast(long)this.step)) of type ulong to uint x.d(4): Error: template instance std.range.iota!(long,long,int) error instantiating
Comment #1 by kennytm — 2011-06-21T01:49:32Z
Comment #2 by kennytm — 2011-06-22T08:43:16Z