mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-10 05:38:10 +00:00
fixes #25849 fixes https://github.com/nim-lang/Nim/issues/25872
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
when defined(nimPreviewSlimSystem):
|
||||
import std/assertions
|
||||
|
||||
when not defined(nimNoLentIterators):
|
||||
when (not defined(nimNoLentIterators)) and not defined(js) and not defined(nimscript):
|
||||
template lent2(T): untyped = lent T
|
||||
else:
|
||||
template lent2(T): untyped = T
|
||||
@@ -37,7 +37,7 @@ iterator mitems*[T](a: var openArray[T]): var T {.inline.} =
|
||||
yield a[i]
|
||||
unCheckedInc(i)
|
||||
|
||||
iterator items*[IX, T](a: array[IX, T]): T {.inline.} =
|
||||
iterator items*[IX, T](a: array[IX, T]): lent2 T {.inline.} =
|
||||
## Iterates over each item of `a`.
|
||||
when a.len > 0:
|
||||
var i = low(IX)
|
||||
|
||||
Reference in New Issue
Block a user