iterators: several small fixes (#11162)
* fix pairs, mpairs, mitems for cstring for JS backend * add mutation check for pairs and mpairs for strings and seqs * change the assertion message - modifying (changing elements) is not a problem, changing the length is
This commit is contained in:
parent
d2e1936cf2
commit
ce152ed91f
3 changed files with 53 additions and 26 deletions
|
|
@ -38,7 +38,7 @@ iterator unitems*[T](a: seq[owned T]): T {.inline.} =
|
|||
while i < L:
|
||||
yield a[i]
|
||||
inc(i)
|
||||
assert(len(a) == L, "seq modified while iterating over it")
|
||||
assert(len(a) == L, "the length of the seq changed while iterating over it")
|
||||
|
||||
proc newWindow(): owned Window =
|
||||
proc windraw(self: Widget) =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue