diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-09-05 11:56:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-05 11:56:32 +0200 |
commit | a5e2db2ac53aa61d0e050ee6487e38c647eb442d (patch) | |
tree | 5544badb2d7ad8da252e16386bdf27998d076161 /compiler/ccgexprs.nim | |
parent | 58bcf6cd46fe9108f2dced59c612153d2951aee2 (diff) | |
download | Nim-a5e2db2ac53aa61d0e050ee6487e38c647eb442d.tar.gz |
allows access to .compileTime vars at runtime (#12128)
Diffstat (limited to 'compiler/ccgexprs.nim')
-rw-r--r-- | compiler/ccgexprs.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim index 0902e2e19..253c67b24 100644 --- a/compiler/ccgexprs.nim +++ b/compiler/ccgexprs.nim @@ -2533,6 +2533,9 @@ proc expr(p: BProc, n: PNode, d: var TLoc) = of skVar, skForVar, skResult, skLet: if {sfGlobal, sfThread} * sym.flags != {}: genVarPrototype(p.module, n) + if sfCompileTime in sym.flags: + genSingleVar(p, sym, n, astdef(sym)) + if sym.loc.r == nil or sym.loc.t == nil: #echo "FAILED FOR PRCO ", p.prc.name.s #echo renderTree(p.prc.ast, {renderIds}) |