bugfix: threads should work again; fixes #220

This commit is contained in:
Araq 2012-10-12 23:34:43 +02:00
commit 1d30798363
3 changed files with 34 additions and 5 deletions

View file

@ -471,7 +471,8 @@ proc analyseIfAddressTaken(c: PContext, n: PNode): PNode =
result = n
case n.kind
of nkSym:
if skipTypes(n.sym.typ, abstractInst).kind != tyVar:
# n.sym.typ can be nil in 'check' mode ...
if n.sym.typ != nil and skipTypes(n.sym.typ, abstractInst).kind != tyVar:
incl(n.sym.flags, sfAddrTaken)
result = newHiddenAddrTaken(c, n)
of nkDotExpr: