diff options
author | Tanguy <tanguy@status.im> | 2022-09-16 20:10:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-17 02:10:47 +0800 |
commit | 3a5e38ab9dd560ae8e29e66980b1cc4bbf45ebaf (patch) | |
tree | bb607e5dff0ded0f57d1100d33ff69404ba8dcd5 /compiler | |
parent | d44b547144e2db5ec7083219a77b318d4dff0133 (diff) | |
download | Nim-3a5e38ab9dd560ae8e29e66980b1cc4bbf45ebaf.tar.gz |
Allow custom pragma on iterators [backport] (#20344)
Allow custom pragma on iterators
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/pragmas.nim | 2 |
1 files changed, 1 insertions, 1 deletions
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: |