summary refs log tree commit diff stats
path: root/compiler/pragmas.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-09-05 11:56:32 +0200
committerGitHub <noreply@github.com>2019-09-05 11:56:32 +0200
commita5e2db2ac53aa61d0e050ee6487e38c647eb442d (patch)
tree5544badb2d7ad8da252e16386bdf27998d076161 /compiler/pragmas.nim
parent58bcf6cd46fe9108f2dced59c612153d2951aee2 (diff)
downloadNim-a5e2db2ac53aa61d0e050ee6487e38c647eb442d.tar.gz
allows access to .compileTime vars at runtime (#12128)
Diffstat (limited to 'compiler/pragmas.nim')
-rw-r--r--compiler/pragmas.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim
index 3de12cfa9..6c70e4bad 100644
--- a/compiler/pragmas.nim
+++ b/compiler/pragmas.nim
@@ -839,7 +839,7 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int,
       of wCompileTime:
         noVal(c, it)
         incl(sym.flags, sfCompileTime)
-        incl(sym.loc.flags, lfNoDecl)
+        #incl(sym.loc.flags, lfNoDecl)
       of wGlobal:
         noVal(c, it)
         incl(sym.flags, sfGlobal)
@@ -1131,7 +1131,7 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int,
     elif comesFromPush and whichKeyword(ident) in {wTags, wRaises}:
       discard "ignore the .push pragma; it doesn't apply"
     else:
-      if sym == nil or (sym != nil and sym.kind in {skVar, skLet, skParam,
+      if sym == nil or (sym.kind in {skVar, skLet, skParam,
                         skField, skProc, skFunc, skConverter, skMethod, skType}):
         n.sons[i] = semCustomPragma(c, it)
       elif sym != nil: