mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-04 21:14:48 +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:
@@ -175,7 +175,7 @@ proc `[]`*(n: NimNode, i: BackwardsIndex): NimNode = n[n.len - i.int]
|
||||
template `^^`(n: NimNode, i: untyped): untyped =
|
||||
(when i is BackwardsIndex: n.len - int(i) else: int(i))
|
||||
|
||||
proc `[]`*[T, U](n: NimNode, x: HSlice[T, U]): seq[NimNode] =
|
||||
proc `[]`*[T, U: Ordinal](n: NimNode, x: HSlice[T, U]): seq[NimNode] =
|
||||
## Slice operation for NimNode.
|
||||
## Returns a seq of child of `n` who inclusive range [n[x.a], n[x.b]].
|
||||
let xa = n ^^ x.a
|
||||
|
||||
Reference in New Issue
Block a user