Skip to content

Commit

Permalink
Merge pull request #1582 from fowlmouth/patch-1
Browse files Browse the repository at this point in the history
fix issue #1581
  • Loading branch information
Araq committed Oct 21, 2014
2 parents e0bdf4f + 50d9db0 commit 8910908
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler/vmgen.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8910908

Please sign in to comment.