diff options
author | Araq <rumpf_a@web.de> | 2014-08-15 09:57:03 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-08-15 09:57:03 +0200 |
commit | ae681be62918ea1e766b230e2d098177794469e9 (patch) | |
tree | d5059ffa36875eacdd01620dcdbbe8db28729ad1 /compiler/vmgen.nim | |
parent | f70b35b3b7837028296bcb06120fc293d11c613c (diff) | |
download | Nim-ae681be62918ea1e766b230e2d098177794469e9.tar.gz |
fixes #1343
Diffstat (limited to 'compiler/vmgen.nim')
-rw-r--r-- | compiler/vmgen.nim | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim index adbca8cca..94afbf008 100644 --- a/compiler/vmgen.nim +++ b/compiler/vmgen.nim @@ -1118,10 +1118,9 @@ 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 s.position == 0: - if s.kind in {skVar, skTemp, skLet, skParam, skResult} and - not s.isOwnedBy(c.prc.sym) and s.owner != c.module: - cannotEval(n) + if s.kind in {skVar, skTemp, skLet, skParam, skResult} and + not s.isOwnedBy(c.prc.sym) and s.owner != c.module: + cannotEval(n) proc isTemp(c: PCtx; dest: TDest): bool = result = dest >= 0 and c.prc.slots[dest].kind >= slotTempUnknown |