mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-29 18:53:58 +00:00
fix floats slice (#16853)
* see whether it breaks * fix * fix * minor * fix * add enum * use Ordinal types * fix tests * fix * another style * fix remainning cases
This commit is contained in:
@@ -87,7 +87,7 @@ iterator items*[T: enum](E: typedesc[T]): T =
|
||||
for v in low(E) .. high(E):
|
||||
yield v
|
||||
|
||||
iterator items*[T](s: HSlice[T, T]): T =
|
||||
iterator items*[T: Ordinal](s: Slice[T]): T =
|
||||
## Iterates over the slice `s`, yielding each value between `s.a` and `s.b`
|
||||
## (inclusively).
|
||||
for x in s.a .. s.b:
|
||||
|
||||
Reference in New Issue
Block a user