fixes #25121; [FieldDefect] with iterator-loop (#25130)

fixes #25121
This commit is contained in:
ringabout
2025-08-29 03:51:45 +08:00
committed by GitHub
parent d472022a77
commit 0a8f618e2b
2 changed files with 14 additions and 1 deletions

View File

@@ -412,3 +412,15 @@ block: # bug #24033
collections.add (id, str, $num)
doAssert collections[1] == (1, "foo", "3.14")
block: # bug #25121
iterator k(): int =
when nimvm:
yield 0
else:
yield 0
for _ in k():
(proc() = (; let _ = block: 0))()