ignore typeof in closure iterators (#24861)

fixes #24859
This commit is contained in:
metagn
2025-04-11 23:50:13 +03:00
committed by GitHub
parent 897126a711
commit f58cd51fc4
2 changed files with 8 additions and 1 deletions

View File

@@ -164,7 +164,7 @@ type
const
nkSkip = {nkEmpty..nkNilLit, nkTemplateDef, nkTypeSection, nkStaticStmt,
nkCommentStmt, nkMixinStmt, nkBindStmt} + procDefs
nkCommentStmt, nkMixinStmt, nkBindStmt, nkTypeOfExpr} + procDefs
emptyStateLabel = -1
localNotSeen = -1
localRequiresLifting = -2

View File

@@ -0,0 +1,7 @@
# issue #24859
template u(): int =
yield 0
0
iterator s(): int {.closure.} = discard default(typeof(u()))
let _ = s