bugfixes for closures

This commit is contained in:
Araq 2012-06-21 08:46:56 +02:00
commit 7b4560337b
7 changed files with 58 additions and 13 deletions

View file

@ -767,7 +767,7 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
pushProcCon(c, s)
if s.typ.sons[0] != nil and kind != skIterator:
addResult(c, s.typ.sons[0], n.info, kind)
if sfImportc notin s.flags:
if sfImportc notin s.flags:
# no semantic checking for importc:
n.sons[bodyPos] = semStmtScope(c, n.sons[bodyPos])
if s.typ.sons[0] != nil and kind != skIterator: addResultNode(c, n)