summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2014-10-21 21:48:05 +0200
committerAndreas Rumpf <rumpf_a@web.de>2014-10-21 21:48:05 +0200
commit8910908effd53dae0d1d5555513937f891e7f7d1 (patch)
tree480465eae336425c1a7ad042ad47e7089e439228
parente0bdf4f4bfcb38e7d6c75141721e808f0ad4ce44 (diff)
parent50d9db03c64f6641254c098ba359dfc11e352936 (diff)
downloadNim-8910908effd53dae0d1d5555513937f891e7f7d1.tar.gz
Merge pull request #1582 from fowlmouth/patch-1
fix issue #1581
-rw-r--r--compiler/vmgen.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim
index fac3cf1bf..e0e34306c 100644
--- a/compiler/vmgen.nim
+++ b/compiler/vmgen.nim
@@ -1126,6 +1126,7 @@ proc checkCanEval(c: PCtx; n: PNode) =
   # we need to ensure that we don't evaluate 'x' here:
   # proc foo() = var x ...
   let s = n.sym
+  if {sfCompileTime, sfGlobal} <= s.flags: return
   if s.kind in {skVar, skTemp, skLet, skParam, skResult} and 
       not s.isOwnedBy(c.prc.sym) and s.owner != c.module:
     cannotEval(n)