mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-03 12:34:44 +00:00
fixes #21110; duplicate proc definitions for iters
(cherry picked from commit 88114948c4)
This commit is contained in:
@@ -112,3 +112,18 @@ let res = collect:
|
||||
fn2(v2)
|
||||
|
||||
doAssert res == @[42, 43, 43, 44]
|
||||
|
||||
block: # bug #21110
|
||||
iterator p(): int =
|
||||
when nimvm:
|
||||
yield 0
|
||||
else:
|
||||
yield 0
|
||||
|
||||
template foo =
|
||||
for k in p():
|
||||
let m = ""
|
||||
proc e() = discard m & ""
|
||||
e()
|
||||
static: foo()
|
||||
foo()
|
||||
|
||||
Reference in New Issue
Block a user