bugfix: the code gen can now handle alias TLock = TSysLock; this fixes threading bugs

This commit is contained in:
Araq 2011-12-23 00:17:59 +01:00
commit 69cc24cdf6
5 changed files with 20 additions and 5 deletions

View file

@ -733,7 +733,8 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
n.sons[bodyPos] = ast.emptyNode
else:
if proto != nil: LocalError(n.info, errImplOfXexpected, proto.name.s)
if {sfImportc, sfBorrow} * s.flags == {}: incl(s.flags, sfForward)
if {sfImportc, sfBorrow} * s.flags == {} and s.magic == mNone:
incl(s.flags, sfForward)
elif sfBorrow in s.flags: semBorrow(c, n, s)
sideEffectsCheck(c, s)
closeScope(c.tab) # close scope for parameters