diff options
Diffstat (limited to 'lib/core/macros.nim')
-rw-r--r-- | lib/core/macros.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/core/macros.nim b/lib/core/macros.nim index e579d6b30..6e1089b39 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -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 |