This commit is contained in:
Andreas Rumpf 2017-11-02 15:39:44 +01:00
commit 30b098fcaf
6 changed files with 10 additions and 8 deletions

View file

@ -1985,7 +1985,7 @@ iterator countdown*[T](a, b: T, step = 1): T {.inline.} =
yield res
dec(res, step)
iterator countup*[S, T](a: S, b: T, step = 1): T {.inline.} =
iterator countup*[T](a, b: T, step = 1): T {.inline.} =
## Counts from ordinal value `a` up to `b` (inclusive) with the given
## step count. `S`, `T` may be any ordinal type, `step` may only
## be positive. **Note**: This fails to count to ``high(int)`` if T = int for
@ -2001,7 +2001,7 @@ iterator countup*[S, T](a: S, b: T, step = 1): T {.inline.} =
yield res
inc(res, step)
iterator `..`*[S, T](a: S, b: T): T {.inline.} =
iterator `..`*[T](a, b: T): T {.inline.} =
## An alias for `countup`.
when T is IntLikeForCount:
var res = int(a)
@ -3433,7 +3433,7 @@ template `..<`*(a, b: untyped): untyped =
## a shortcut for 'a..pred(b)'.
a .. pred(b)
iterator `..<`*[S,T](a: S, b: T): T =
iterator `..<`*[T](a, b: T): T =
var i = T(a)
while i < b:
yield i