bugfix: compiler errors for explicit initialization of thread local variables; os.nim does not rely on it anymore

This commit is contained in:
Araq 2011-12-23 20:05:08 +01:00
commit 76f91b90e2
3 changed files with 9 additions and 4 deletions

View file

@ -269,7 +269,8 @@ proc semVarOrLet(c: PContext, n: PNode, symkind: TSymKind): PNode =
if def != nil and def.kind != nkEmpty:
# this is only needed for the evaluation pass:
v.ast = def
if a.kind != nkVarTuple:
if sfThread in v.flags: LocalError(def.info, errThreadvarCannotInit)
if a.kind != nkVarTuple:
v.typ = typ
b = newNodeI(nkIdentDefs, a.info)
addSon(b, newSymNode(v))