Merge branch 'bigbreak' of https://github.com/Araq/Nimrod into bigbreak
This commit is contained in:
commit
ca4d7b1ea8
11 changed files with 158 additions and 91 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue