From 3a5e38ab9dd560ae8e29e66980b1cc4bbf45ebaf Mon Sep 17 00:00:00 2001 From: Tanguy Date: Fri, 16 Sep 2022 20:10:47 +0200 Subject: Allow custom pragma on iterators [backport] (#20344) Allow custom pragma on iterators --- compiler/pragmas.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler') diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim index 06e861084..101b17bf6 100644 --- a/compiler/pragmas.nim +++ b/compiler/pragmas.nim @@ -1247,7 +1247,7 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int, elif comesFromPush and whichKeyword(ident) != wInvalid: discard "ignore the .push pragma; it doesn't apply" else: - if sym == nil or (sym.kind in {skVar, skLet, skParam, + if sym == nil or (sym.kind in {skVar, skLet, skParam, skIterator, skField, skProc, skFunc, skConverter, skMethod, skType}): n[i] = semCustomPragma(c, it) elif sym != nil: -- cgit 1.4.1-2-gfad0