From 50d9db03c64f6641254c098ba359dfc11e352936 Mon Sep 17 00:00:00 2001 From: Billingsly Wetherfordshire Date: Mon, 20 Oct 2014 19:12:10 -0500 Subject: [PATCH] fix issue #1581 --- compiler/vmgen.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim index fac3cf1bfd..e0e34306ce 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)