summary refs log tree commit diff stats
path: root/compiler/pragmas.nim
diff options
context:
space:
mode:
authorLemonBoy <LemonBoy@users.noreply.github.com>2018-08-23 21:43:10 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-08-24 09:40:17 +0200
commitb1c2416abde695dc45ee6b2d97f4d8e125b68140 (patch)
tree01020a8e360a8d7c6a23bfb5a335993320d25e37 /compiler/pragmas.nim
parent30621c4a8969ac4b121d04a06315bd4f2089a7c4 (diff)
downloadNim-b1c2416abde695dc45ee6b2d97f4d8e125b68140.tar.gz
Validate pragmas attached to for variables (#8749)
Fixes #8741
Diffstat (limited to 'compiler/pragmas.nim')
-rw-r--r--compiler/pragmas.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim
index 263068344..66682650d 100644
--- a/compiler/pragmas.nim
+++ b/compiler/pragmas.nim
@@ -71,6 +71,7 @@ const
   letPragmas* = varPragmas
   procTypePragmas* = {FirstCallConv..LastCallConv, wVarargs, wNosideeffect,
                       wThread, wRaises, wLocks, wTags, wGcSafe}
+  forVarPragmas* = {wInject, wGensym}
   allRoutinePragmas* = methodPragmas + iteratorPragmas + lambdaPragmas
 
 proc getPragmaVal*(procAst: PNode; name: TSpecialWord): PNode =